Documentation ¶
Index ¶
- Constants
- Variables
- func AddToDebugInfo(di *debug.Info)
- func ClientBootstrapping() bool
- func ClientReady() bool
- func EstablishCrane(ctx context.Context, dst *hub.Hub) (*docks.Crane, error)
- func EstablishPublicLane(ctx context.Context, dst *hub.Hub) (*docks.Crane, *terminal.Error)
- func GetDNSExitHubPolicy() (endpoints.Endpoints, error)
- func IsExcepted(ip net.IP) bool
- type BootstrapFile
- type BootstrapFileEntry
- type GossipMsgType
- type GossipOp
- type GossipQueryOp
- type PublishOp
- type SPNStatus
- type SPNStatusName
Constants ¶
const GossipOpType string = "gossip"
GossipOpType is the type ID of the gossip operation.
const GossipQueryOpType string = "gossip/query"
GossipQueryOpType is the type ID of the gossip query operation.
const PublishOpType string = "publish"
PublishOpType is the type ID of the publish operation.
Variables ¶
var ( // CfgOptionEnableSPNKey is the configuration key for the SPN module. CfgOptionEnableSPNKey = "spn/enable" // CfgOptionHomeHubPolicyKey is the configuration key for the SPN home policy. CfgOptionHomeHubPolicyKey = "spn/homePolicy" // CfgOptionDNSExitHubPolicyKey is the configuration key for the SPN DNS exit policy. CfgOptionDNSExitHubPolicyKey = "spn/dnsExitPolicy" )
var ErrAllHomeHubsExcluded = errors.New("all home hubs are excluded")
ErrAllHomeHubsExcluded is returned when all available home hubs were excluded.
Functions ¶
func AddToDebugInfo ¶ added in v0.4.4
AddToDebugInfo adds the SPN status to the given debug.Info.
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
EstablishCrane establishes a crane to another Hub.
func EstablishPublicLane ¶ added in v0.3.0
EstablishPublicLane establishes a crane to another Hub and publishes it.
func GetDNSExitHubPolicy ¶ added in v0.4.3
GetDNSExitHubPolicy return the current DNS exit policy.
func IsExcepted ¶ added in v0.3.0
IsExcepted checks if the given IP is currently excepted from the SPN.
Types ¶
type BootstrapFile ¶
type BootstrapFile struct {
Main BootstrapFileEntry
}
BootstrapFile is used for sideloading bootstrap data.
type BootstrapFileEntry ¶ added in v0.3.0
type BootstrapFileEntry struct {
Hubs []string
}
BootstrapFileEntry is the bootstrap data structure for one map.
type GossipMsgType ¶ added in v0.3.0
type GossipMsgType uint8
GossipMsgType is the gossip message type.
const ( GossipHubAnnouncementMsg GossipMsgType = 1 GossipHubStatusMsg GossipMsgType = 2 )
Gossip Message Types.
func (GossipMsgType) String ¶ added in v0.3.0
func (msgType GossipMsgType) String() string
type GossipOp ¶ added in v0.3.0
GossipOp is used to gossip Hub messages.
func NewGossipOp ¶ added in v0.3.0
func NewGossipOp(controller *docks.CraneControllerTerminal) (*GossipOp, *terminal.Error)
NewGossipOp start a new gossip operation.
type GossipQueryOp ¶ added in v0.3.0
GossipQueryOp is used to query gossip messages.
func NewGossipQueryOp ¶ added in v0.3.0
func NewGossipQueryOp(t terminal.OpTerminal) (*GossipQueryOp, *terminal.Error)
NewGossipQueryOp starts a new gossip query operation.
func (*GossipQueryOp) Deliver ¶ added in v0.3.0
func (op *GossipQueryOp) Deliver(c *container.Container) *terminal.Error
Deliver delivers the message to the operation.
func (*GossipQueryOp) End ¶ added in v0.3.0
func (op *GossipQueryOp) End(err *terminal.Error)
End ends the operation.
func (*GossipQueryOp) Type ¶ added in v0.3.0
func (op *GossipQueryOp) Type() string
Type returns the type ID.
type PublishOp ¶ added in v0.3.0
PublishOp is used to publish a connection.
func NewPublishOp ¶ added in v0.3.0
func NewPublishOp(controller *docks.CraneControllerTerminal, identity *cabin.Identity) (*PublishOp, *terminal.Error)
NewPublishOp start a new publish operation.
type SPNStatus ¶ added in v0.3.7
type SPNStatus struct { record.Base sync.Mutex Status SPNStatusName HomeHubID string HomeHubName string ConnectedIP string ConnectedTransport string ConnectedSince *time.Time }
SPNStatus holds SPN status information.
type SPNStatusName ¶ added in v0.3.7
type SPNStatusName string
SPNStatusName is a SPN status.
const ( StatusFailed SPNStatusName = "failed" StatusDisabled SPNStatusName = "disabled" StatusConnecting SPNStatusName = "connecting" StatusConnected SPNStatusName = "connected" )
SPN Stati.