Documentation ¶
Index ¶
- Variables
- func MakeHandler(svc Service, logger kitlog.Logger, repository repository.Repository) http.Handler
- func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, newClaims kitjwt.ClaimsFactory) endpoint.Middleware
- func WaitForTerminal(k8sClient *k8s.Clientset, cfg *rest.Config, ts TerminalSession, ...)
- type IndexData
- type PtyHandler
- type Service
- type TerminalMessage
- type TerminalResult
- type TerminalSession
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPodK8sGet = errors.New("容器获取失败,该容器可能不存在") ErrSessionIdGenerate = errors.New("SessionId 生成失败,请刷新页面重试") )
Functions ¶
func MakeHandler ¶
func MakeHandler(svc Service, logger kitlog.Logger, repository repository.Repository) http.Handler
func NewParser ¶
func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, newClaims kitjwt.ClaimsFactory) endpoint.Middleware
func WaitForTerminal ¶
Types ¶
type PtyHandler ¶
type PtyHandler interface { io.Reader io.Writer remotecommand.TerminalSizeQueue }
type Service ¶
type Service interface { //Attach(ctx context.Context, path string) http.Handler // 终端控制台页面 Index(ctx context.Context, podName, container string) (*IndexData, error) // 处理客户端发来的ws建立请求 HandleTerminalSession(session sockjs.Session) }
func NewService ¶
type TerminalMessage ¶
type TerminalResult ¶
type TerminalResult struct { SessionId string `json:"sessionId,omitempty"` Token string `json:"token,omitempty"` Cluster string `json:"cluster,omitempty"` Namespace string `json:"namespace,omitempty"` Pod string `json:"pod,omitempty"` Container string `json:"container,omitempty"` Cmd string `json:"cmd,omitempty"` }
type TerminalSession ¶
type TerminalSession struct {
// contains filtered or unexported fields
}
func (TerminalSession) Close ¶
func (t TerminalSession) Close(status uint32, reason string)
func (TerminalSession) Next ¶
func (t TerminalSession) Next() *remotecommand.TerminalSize
Click to show internal directories.
Click to hide internal directories.