captain

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: AGPL-3.0 Imports: 37 Imported by: 3

Documentation

Index

Constants

View Source
const GossipOpType string = "gossip"
View Source
const GossipQueryOpType string = "gossip/query"
View Source
const PublishOpType string = "publish"

Variables

View Source
var (
	CfgOptionEnableSPNKey = "spn/enable"
)

Functions

func ClientBootstrapping added in v0.3.8

func ClientBootstrapping() bool

ClientBootstrapping signifies if the SPN is currently bootstrapping and requires normal connectivity for download assets.

func ClientReady

func ClientReady() bool

ClientReady signifies if the SPN client is fully ready to handle connections.

func EstablishCrane added in v0.3.0

func EstablishCrane(dst *hub.Hub) (*docks.Crane, error)

func EstablishPublicLane added in v0.3.0

func EstablishPublicLane(dst *hub.Hub) (*docks.Crane, error)

func IsExcepted added in v0.3.0

func IsExcepted(ip net.IP) bool

Types

type BootstrapFile

type BootstrapFile struct {
	Main BootstrapFileEntry
}

type BootstrapFileEntry added in v0.3.0

type BootstrapFileEntry struct {
	Hubs []string
}

type GossipMsgType added in v0.3.0

type GossipMsgType uint8
const (
	GossipHubAnnouncementMsg GossipMsgType = 1
	GossipHubStatusMsg       GossipMsgType = 2
)

func (GossipMsgType) String added in v0.3.0

func (msgType GossipMsgType) String() string

type GossipOp added in v0.3.0

type GossipOp struct {
	terminal.OpBase
	// contains filtered or unexported fields
}

func NewGossipOp added in v0.3.0

func NewGossipOp(controller *docks.CraneControllerTerminal) (*GossipOp, *terminal.Error)

func (*GossipOp) Deliver added in v0.3.0

func (op *GossipOp) Deliver(c *container.Container) *terminal.Error

func (*GossipOp) End added in v0.3.0

func (op *GossipOp) End(err *terminal.Error)

func (*GossipOp) Type added in v0.3.0

func (op *GossipOp) Type() string

type GossipQueryOp added in v0.3.0

type GossipQueryOp struct {
	terminal.OpBase
	// contains filtered or unexported fields
}

func NewGossipQueryOp added in v0.3.0

func NewGossipQueryOp(t terminal.OpTerminal) (*GossipQueryOp, *terminal.Error)

func (*GossipQueryOp) Deliver added in v0.3.0

func (op *GossipQueryOp) Deliver(c *container.Container) *terminal.Error

func (*GossipQueryOp) End added in v0.3.0

func (op *GossipQueryOp) End(err *terminal.Error)

func (*GossipQueryOp) Type added in v0.3.0

func (op *GossipQueryOp) Type() string

type PublishOp added in v0.3.0

type PublishOp struct {
	terminal.OpBase
	// contains filtered or unexported fields
}

func NewPublishOp added in v0.3.0

func NewPublishOp(controller *docks.CraneControllerTerminal, identity *cabin.Identity) (*PublishOp, *terminal.Error)

func (*PublishOp) Deliver added in v0.3.0

func (op *PublishOp) Deliver(c *container.Container) *terminal.Error

func (*PublishOp) End added in v0.3.0

func (op *PublishOp) End(tErr *terminal.Error)

func (*PublishOp) Result added in v0.3.0

func (op *PublishOp) Result() <-chan *terminal.Error

func (*PublishOp) Type added in v0.3.0

func (op *PublishOp) Type() string

type SPNStatus added in v0.3.7

type SPNStatus struct {
	record.Base
	sync.Mutex

	Status             SPNStatusName
	HomeHubID          string
	ConnectedIP        string
	ConnectedTransport string
	ConnectedSince     *time.Time
}

type SPNStatusName added in v0.3.7

type SPNStatusName string
const (
	StatusFailed     SPNStatusName = "failed"
	StatusDisabled   SPNStatusName = "disabled"
	StatusConnecting SPNStatusName = "connecting"
	StatusConnected  SPNStatusName = "connected"
)

Jump to

Keyboard shortcuts

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