Documentation
¶
Index ¶
- Constants
- 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 PubKey
- type PubKeys
- 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"
View Source
const PubKeyRawKey = "pubkey-raw"
Variables ¶
This section is empty.
Functions ¶
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 ServantID, netAddr string) error LoadLocation(id ServantID) (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 ¶
Click to show internal directories.
Click to hide internal directories.