connection

package
v0.0.0-...-7de36fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is a builder for ssh connections. After the server handshake is complete, the server builds a connection handler with this builder.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a sshConnection.

func (*Builder) Build

func (s *Builder) Build() (*Handler, error)

Build builds the sshConnection. All fields must be set otherwise an error is returned.

func (*Builder) SetChannel

func (s *Builder) SetChannel(channel <-chan ssh.NewChannel)

SetChannel sets the channel.

func (*Builder) SetConnection

func (s *Builder) SetConnection(connection *ssh.ServerConn)

SetConnection sets the connection.

func (*Builder) SetGlobalRequests

func (s *Builder) SetGlobalRequests(reqs <-chan *ssh.Request)

SetGlobalRequests sets the global requests.

func (*Builder) SetK8sHelper

func (s *Builder) SetK8sHelper(helper kubernetes.K8sAPI)

SetK8sHelper sets the k8shelper interface.

func (*Builder) SetLogger

func (s *Builder) SetLogger(log *zap.Logger)

SetLogger sets the logger.

type Handler

type Handler struct {

	// Also needed by channel handlers
	kubernetes.K8sAPIUser
	// contains filtered or unexported fields
}

Handler is the connection handler. It handles the global connection and the channels.

func (*Handler) HandleGlobalConnection

func (c *Handler) HandleGlobalConnection(ctx context.Context)

HandleGlobalConnection handles the global connection and is the entry point for this handler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL