Documentation
¶
Index ¶
- Constants
- func CheckPublicKeys(trustedPubKeys ...[]byte) func(ssh.PublicKey) bool
- func WebsocketDial(ctx context.Context, addr string) (net.Conn, error)
- func WebsocketUpgrade(conn io.ReadWriter) error
- type ClientType
- type Command
- type DB
- type ExecMeta
- type Hub
- type HubHeader
- type Logger
- type Master
- type MountDirMeta
- type Servant
- type ServantID
- type TunnelHeader
Constants ¶
View Source
const ( UnmarshalMetaFailed ssh.RejectionReason = iota + ssh.ResourceShortage + 1000 FailedStartPTY )
View Source
const DefaultSignTimeout = 10 * time.Second
View Source
const ExecResizeRequest = "resize"
Variables ¶
This section is empty.
Functions ¶
func CheckPublicKeys ¶ added in v0.2.0
func WebsocketUpgrade ¶
func WebsocketUpgrade(conn io.ReadWriter) error
Types ¶
type ClientType ¶
type ClientType int
const ( ClientTypeServant ClientType = iota ClientTypeMaster )
type DB ¶
type DB interface { StoreLocation(id string, netAddr string) error LoadLocation(idPrefix string) (netAddr string, err error) }
DB store the location of which hub node the servant is connected to.
type Hub ¶
type Hub struct { Logger *slog.Logger DB DB GetIP func() (string, error) // contains filtered or unexported fields }
func (*Hub) Handle ¶
func (h *Hub) Handle(conn io.ReadWriteCloser)
type HubHeader ¶
type HubHeader struct { Type ClientType ID ServantID }
type MountDirMeta ¶
type Servant ¶
func NewServant ¶
func (*Servant) Serve ¶ added in v0.1.0
func (s *Servant) Serve(conn io.ReadWriteCloser) func()
Click to show internal directories.
Click to hide internal directories.