Documentation
¶
Index ¶
- Variables
- type Builder
- func (b *Builder) Build() (*Handler, error)
- func (b *Builder) SetChannel(channel ssh.Channel)
- func (b *Builder) SetDirectTCPIPData(directTCPIPData *payload.ForwardTCPChannelOpen)
- func (b *Builder) SetK8sUserAPI(api kubernetes.K8sAPIUser)
- func (b *Builder) SetLog(logger *zap.Logger)
- func (b *Builder) SetOnReqDefault(onReqDefault func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnReqPty(onReqPty func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnReqShell(onReqShell func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnReqSubSys(onReqSubSys func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnReqWinCh(onReqWinCh func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnRequest(onRequest func(context.Context, *ssh.Request, *callbackData))
- func (b *Builder) SetOnStartup(onStartup func(context.Context, *callbackData))
- func (b *Builder) SetRequests(requests <-chan *ssh.Request)
- func (b *Builder) WithChannelType(channelType string) *Builder
- type Channel
- type Handler
- type TerminalSizeHandler
Constants ¶
This section is empty.
Variables ¶
var ( // ErrQueueFull is returned when the queue is full. ErrQueueFull = errors.New("winsize: queue is full") // ErrQueueClosed is returned when a channel is closed. ErrQueueClosed = errors.New("chan is closed, cannot append data") )
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is builder for channels.
func DirectTCPIPBuilderSkeleton ¶
func DirectTCPIPBuilderSkeleton() *Builder
DirectTCPIPBuilderSkeleton returns a new ChannelHandlerBuilder, which has the corresponding field set to handle directTCPIP.
func SessionBuilderSkeleton ¶
func SessionBuilderSkeleton() *Builder
SessionBuilderSkeleton returns a ChannelHandlerBuilder, which has the corresponding field set to handle sessions.
func (*Builder) SetChannel ¶
SetChannel sets the channel.
func (*Builder) SetDirectTCPIPData ¶
func (b *Builder) SetDirectTCPIPData(directTCPIPData *payload.ForwardTCPChannelOpen)
SetDirectTCPIPData sets the directTCPIPData.
func (*Builder) SetK8sUserAPI ¶
func (b *Builder) SetK8sUserAPI(api kubernetes.K8sAPIUser)
SetK8sUserAPI sets the k8sAPIUser.
func (*Builder) SetOnReqDefault ¶
SetOnReqDefault sets the onReqDefault callback.
func (*Builder) SetOnReqPty ¶
SetOnReqPty sets the onReqPty callback.
func (*Builder) SetOnReqShell ¶
SetOnReqShell sets the onReqShell callback.
func (*Builder) SetOnReqSubSys ¶
SetOnReqSubSys sets the onReqSubSys callback.
func (*Builder) SetOnReqWinCh ¶
SetOnReqWinCh sets the onReqWinCh callback.
func (*Builder) SetOnRequest ¶
SetOnRequest sets the onRequest callback.
func (*Builder) SetOnStartup ¶
SetOnStartup sets the onStartup callback.
func (*Builder) SetRequests ¶
SetRequests sets the requests.
func (*Builder) WithChannelType ¶
WithChannelType sets the channel type.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles incoming requests on a Handler.
type TerminalSizeHandler ¶
type TerminalSizeHandler struct {
// contains filtered or unexported fields
}
TerminalSizeHandler stores the Height and Width of a terminal.
func NewTerminalSizeHandler ¶
func NewTerminalSizeHandler(cap int) *TerminalSizeHandler
NewTerminalSizeHandler creates a new Winsize.
func (*TerminalSizeHandler) Close ¶
func (w *TerminalSizeHandler) Close()
Close closes the winsize queue and chan.
func (*TerminalSizeHandler) Fill ¶
func (w *TerminalSizeHandler) Fill(data *remotecommand.TerminalSize) error
Fill appends the data to the queue.
func (*TerminalSizeHandler) Next ¶
func (w *TerminalSizeHandler) Next() *remotecommand.TerminalSize
Next returns the size. The chanel must be served. Otherwise the connection will hang.