Documentation ¶
Index ¶
Constants ¶
View Source
const ( STDIN = "stdin" CONNECT = "connect" )
shell command type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Method string `json:"method"` Data interface{} `json:"data"` }
Message is the socket message of ssh
type Option ¶
type Option struct { Cluster string Namespace string Pod string Container string Terminal bool Cmd string }
Option is the option of exec proxy
type SocketShell ¶
SocketShell 并不是 ssh 的全称,ssh的全称是 Sentry Socket 这里这样定义的目的只是描述 shell 的实现形式
func NewSocketShell ¶
func NewSocketShell() *SocketShell
NewSocketShell is the function to init a new socket shell
func (*SocketShell) Connect ¶
func (s *SocketShell) Connect(option Option) error
Connect is the function to connect to remote k8s pod
func (*SocketShell) Listen ¶
func (s *SocketShell) Listen()
Listen is the function to listen to remote k8s pod
func (*SocketShell) StdinSend ¶
func (s *SocketShell) StdinSend()
StdinSend is the function to send message from stdin to remote k8s pod
Click to show internal directories.
Click to hide internal directories.