Documentation ¶
Index ¶
- Constants
- Variables
- func AssignCrane(hubID string, crane *Crane)
- func GetAllCranes() map[string]*Crane
- func ImportAndVerifyHubInfo(ctx context.Context, hubID string, announcementData, statusData []byte, ...) (h *hub.Hub, forward bool, tErr *terminal.Error)
- func RegisterCraneUpdateHook(fn func(crane *Crane))
- func RetractCraneByDestination(hubID string)
- func RetractCraneByID(craneID string) (connectedHub *hub.Hub)
- type BlockingSubmitQueue
- type BlockingSubmitter
- type Crane
- func (crane *Crane) AbandonTerminal(id uint32, err *terminal.Error)
- func (crane *Crane) EstablishNewTerminal(localTerm terminal.TerminalInterface, initData *container.Container) *terminal.Error
- func (crane *Crane) LocalAddr() net.Addr
- func (crane *Crane) NotifyUpdate()
- func (crane *Crane) Public() bool
- func (crane *Crane) Publish() error
- func (crane *Crane) RemoteAddr() net.Addr
- func (crane *Crane) Start() error
- func (crane *Crane) Stop(err *terminal.Error)
- func (crane *Crane) String() string
- func (crane *Crane) VerifyConnectedHub() error
- type CraneControllerTerminal
- type CraneTerminal
- type ExpandOp
- type ExpansionRelayTerminal
- type ExpansionTerminal
- func (t *ExpansionTerminal) Abandon(err *terminal.Error)
- func (t *ExpansionTerminal) Deliver(c *container.Container) *terminal.Error
- func (t *ExpansionTerminal) End(err *terminal.Error)
- func (t *ExpansionTerminal) FmtID() string
- func (t *ExpansionTerminal) HasEnded(end bool) bool
- func (t *ExpansionTerminal) ID() uint32
- func (t *ExpansionTerminal) IsAbandoned() bool
- func (t *ExpansionTerminal) SetID(id uint32)
- func (t *ExpansionTerminal) Type() string
Constants ¶
View Source
const ( CraneMsgTypeEnd = 0 CraneMsgTypeInfo = 1 CraneMsgTypeRequestHubInfo = 2 CraneMsgTypeVerify = 3 CraneMsgTypeStartEncrypted = 4 CraneMsgTypeStartUnencrypted = 5 )
View Source
const ExpandOpType string = "expand"
View Source
const (
QOTD = "Privacy is not an option, and it shouldn't be the price we accept for just getting on the Internet.\nGary Kovacs\n"
)
Variables ¶
View Source
var ( CraneStatusStopped int8 = -1 CraneStatusPrivate int8 = 0 CraneStatusPublic int8 = 1 )
Crane Status Options.
View Source
var (
ErrDone = errors.New("crane is done")
)
Errors.
Functions ¶
func AssignCrane ¶
func GetAllCranes ¶ added in v0.3.0
func ImportAndVerifyHubInfo ¶ added in v0.3.0
func RegisterCraneUpdateHook ¶ added in v0.3.0
func RegisterCraneUpdateHook(fn func(crane *Crane))
RegisterCraneUpdateHook allows the captain to hook into receiving updates for cranes.
func RetractCraneByDestination ¶
func RetractCraneByDestination(hubID string)
func RetractCraneByID ¶
Types ¶
type BlockingSubmitQueue ¶ added in v0.3.0
type BlockingSubmitQueue struct {
// contains filtered or unexported fields
}
func NewBlockingSubmitQueue ¶ added in v0.3.0
func NewBlockingSubmitQueue(size int) *BlockingSubmitQueue
type BlockingSubmitter ¶ added in v0.3.0
type BlockingSubmitter struct {
// contains filtered or unexported fields
}
type Crane ¶
type Crane struct { // ID is the ID of the Crane. ID string // ConnectedHub is the identity of the remote Hub. ConnectedHub *hub.Hub // Controller is the Crane's Controller Terminal. Controller *CraneControllerTerminal // contains filtered or unexported fields }
func GetAssignedCrane ¶
func (*Crane) AbandonTerminal ¶ added in v0.3.0
func (*Crane) EstablishNewTerminal ¶ added in v0.3.0
func (*Crane) NotifyUpdate ¶ added in v0.3.0
func (crane *Crane) NotifyUpdate()
NotifyUpdate calls the registers crane update hook function.
func (*Crane) RemoteAddr ¶ added in v0.3.0
func (*Crane) VerifyConnectedHub ¶ added in v0.3.0
type CraneControllerTerminal ¶ added in v0.3.0
type CraneControllerTerminal struct { *terminal.TerminalBase *terminal.DuplexFlowQueue Crane *Crane }
func NewLocalCraneControllerTerminal ¶ added in v0.3.0
func NewLocalCraneControllerTerminal( crane *Crane, initMsg *terminal.TerminalOpts, ) (*CraneControllerTerminal, *container.Container, *terminal.Error)
func NewRemoteCraneControllerTerminal ¶ added in v0.3.0
func NewRemoteCraneControllerTerminal( crane *Crane, initData *container.Container, ) (*CraneControllerTerminal, *terminal.TerminalOpts, *terminal.Error)
func (*CraneControllerTerminal) Abandon ¶ added in v0.3.0
func (controller *CraneControllerTerminal) Abandon(err *terminal.Error)
type CraneTerminal ¶ added in v0.3.0
type CraneTerminal struct { *terminal.TerminalBase *terminal.DuplexFlowQueue // contains filtered or unexported fields }
func NewLocalCraneTerminal ¶ added in v0.3.0
func NewRemoteCraneTerminal ¶ added in v0.3.0
func NewRemoteCraneTerminal( crane *Crane, id uint32, initData *container.Container, ) (*CraneTerminal, *terminal.TerminalOpts, *terminal.Error)
func (*CraneTerminal) Abandon ¶ added in v0.3.0
func (t *CraneTerminal) Abandon(err *terminal.Error)
func (*CraneTerminal) Deliver ¶ added in v0.3.0
func (t *CraneTerminal) Deliver(c *container.Container) *terminal.Error
func (*CraneTerminal) IsAbandoned ¶ added in v0.3.0
func (t *CraneTerminal) IsAbandoned() bool
func (*CraneTerminal) LocalAddr ¶ added in v0.3.0
func (t *CraneTerminal) LocalAddr() net.Addr
func (*CraneTerminal) RemoteAddr ¶ added in v0.3.0
func (t *CraneTerminal) RemoteAddr() net.Addr
type ExpandOp ¶ added in v0.3.0
type ExpandOp struct { terminal.OpBase *terminal.DuplexFlowQueue // contains filtered or unexported fields }
type ExpansionRelayTerminal ¶ added in v0.3.0
type ExpansionRelayTerminal struct { *terminal.DuplexFlowQueue // contains filtered or unexported fields }
func (*ExpansionRelayTerminal) Abandon ¶ added in v0.3.0
func (t *ExpansionRelayTerminal) Abandon(err *terminal.Error)
func (*ExpansionRelayTerminal) Ctx ¶ added in v0.3.0
func (t *ExpansionRelayTerminal) Ctx() context.Context
func (*ExpansionRelayTerminal) FmtID ¶ added in v0.3.0
func (t *ExpansionRelayTerminal) FmtID() string
func (*ExpansionRelayTerminal) ID ¶ added in v0.3.0
func (t *ExpansionRelayTerminal) ID() uint32
type ExpansionTerminal ¶ added in v0.3.0
type ExpansionTerminal struct { *terminal.TerminalBase *terminal.DuplexFlowQueue // contains filtered or unexported fields }
func ExpandTo ¶ added in v0.3.0
func ExpandTo(t terminal.OpTerminal, routeTo string, encryptFor *hub.Hub) (*ExpansionTerminal, *terminal.Error)
func (*ExpansionTerminal) Abandon ¶ added in v0.3.0
func (t *ExpansionTerminal) Abandon(err *terminal.Error)
func (*ExpansionTerminal) Deliver ¶ added in v0.3.0
func (t *ExpansionTerminal) Deliver(c *container.Container) *terminal.Error
func (*ExpansionTerminal) End ¶ added in v0.3.0
func (t *ExpansionTerminal) End(err *terminal.Error)
func (*ExpansionTerminal) FmtID ¶ added in v0.3.0
func (t *ExpansionTerminal) FmtID() string
func (*ExpansionTerminal) HasEnded ¶ added in v0.3.0
func (t *ExpansionTerminal) HasEnded(end bool) bool
func (*ExpansionTerminal) ID ¶ added in v0.3.0
func (t *ExpansionTerminal) ID() uint32
func (*ExpansionTerminal) IsAbandoned ¶ added in v0.3.0
func (t *ExpansionTerminal) IsAbandoned() bool
func (*ExpansionTerminal) SetID ¶ added in v0.3.0
func (t *ExpansionTerminal) SetID(id uint32)
func (*ExpansionTerminal) Type ¶ added in v0.3.0
func (t *ExpansionTerminal) Type() string
Click to show internal directories.
Click to hide internal directories.