Documentation
¶
Index ¶
- Variables
- type AuthzOptions
- type ConnectionEntry
- type Options
- type ServiceEntry
- type Supervisor
- func (n *Supervisor) AddDesiredConnection(pk types.PeerKey, remotePort, localPort uint32, ...)
- func (n *Supervisor) Connect(ctx context.Context, pk types.PeerKey, addrs []netip.AddrPort) error
- func (n *Supervisor) ControlMetrics() control.Metrics
- func (n *Supervisor) ControlService() *control.Service
- func (n *Supervisor) Credentials() *auth.NodeCredentials
- func (n *Supervisor) DesiredConnections() []tunneling.ConnectionInfo
- func (n *Supervisor) GetActivePeerAddress(pk types.PeerKey) (*net.UDPAddr, bool)
- func (n *Supervisor) GetConnectedPeers() []types.PeerKey
- func (n *Supervisor) JoinWithInvite(ctx context.Context, token *admissionv1.InviteToken) (*admissionv1.JoinToken, error)
- func (n *Supervisor) ListenPort() int
- func (n *Supervisor) Membership() membership.MembershipAPI
- func (n *Supervisor) PeerRTT(pk types.PeerKey) (time.Duration, bool)
- func (n *Supervisor) PeerStateCounts() transport.PeerStateCounts
- func (n *Supervisor) Ready() <-chan struct{}
- func (n *Supervisor) ReconnectWindowDuration() time.Duration
- func (n *Supervisor) ReloadAuthzMatcher() error
- func (n *Supervisor) RouteRequest(ctx context.Context, uri wasm.URI, input []byte) ([]byte, error)
- func (n *Supervisor) Run(ctx context.Context) error
- func (n *Supervisor) SeedWorkload(wasmBytes []byte, spec state.WorkloadSpec) (string, error)
- func (n *Supervisor) StateStore() state.StateStore
- func (n *Supervisor) Tunneling() tunneling.TunnelingAPI
- func (n *Supervisor) UnseedWorkload(hash string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMatcher = errors.New("supervisor: authz matcher not configured")
Functions ¶
This section is empty.
Types ¶
type AuthzOptions ¶
type ConnectionEntry ¶
type Options ¶
type Options struct {
PacketConn net.PacketConn
ShutdownFunc func()
RuntimeState *statev1.RuntimeState
PeerCache *peercache.Store
Authz AuthzOptions
SocketPath string
PollenDir string
NodeName string
HTTPAddr string
StaticAddr string
ControlAddr string
ControlToken string
InitialServices []ServiceEntry
InitialConnections []ConnectionEntry
AdvertisedIPs []string
SigningKey ed25519.PrivateKey
IdleInstanceTTL time.Duration
PeerTickInterval time.Duration
MaxConnectionAge time.Duration
GossipInterval time.Duration
GossipJitter float64
ListenPort int
MetricsEnabled bool
BootstrapPublic bool
DisableNATPunch bool
RelayOnly bool
}
type ServiceEntry ¶
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts Options, creds *auth.NodeCredentials, inviteConsumer auth.InviteConsumer) (*Supervisor, error)
func (*Supervisor) AddDesiredConnection ¶
func (n *Supervisor) AddDesiredConnection(pk types.PeerKey, remotePort, localPort uint32, protocol statev1.ServiceProtocol)
func (*Supervisor) ControlMetrics ¶
func (n *Supervisor) ControlMetrics() control.Metrics
func (*Supervisor) ControlService ¶
func (n *Supervisor) ControlService() *control.Service
func (*Supervisor) Credentials ¶
func (n *Supervisor) Credentials() *auth.NodeCredentials
func (*Supervisor) DesiredConnections ¶
func (n *Supervisor) DesiredConnections() []tunneling.ConnectionInfo
func (*Supervisor) GetActivePeerAddress ¶
func (*Supervisor) GetConnectedPeers ¶
func (n *Supervisor) GetConnectedPeers() []types.PeerKey
func (*Supervisor) JoinWithInvite ¶
func (n *Supervisor) JoinWithInvite(ctx context.Context, token *admissionv1.InviteToken) (*admissionv1.JoinToken, error)
func (*Supervisor) ListenPort ¶
func (n *Supervisor) ListenPort() int
func (*Supervisor) Membership ¶
func (n *Supervisor) Membership() membership.MembershipAPI
func (*Supervisor) PeerStateCounts ¶
func (n *Supervisor) PeerStateCounts() transport.PeerStateCounts
func (*Supervisor) Ready ¶
func (n *Supervisor) Ready() <-chan struct{}
func (*Supervisor) ReconnectWindowDuration ¶
func (n *Supervisor) ReconnectWindowDuration() time.Duration
func (*Supervisor) ReloadAuthzMatcher ¶
func (n *Supervisor) ReloadAuthzMatcher() error
A failed reload leaves the previous rules in place.
func (*Supervisor) RouteRequest ¶
func (*Supervisor) SeedWorkload ¶
func (n *Supervisor) SeedWorkload(wasmBytes []byte, spec state.WorkloadSpec) (string, error)
func (*Supervisor) StateStore ¶
func (n *Supervisor) StateStore() state.StateStore
func (*Supervisor) Tunneling ¶
func (n *Supervisor) Tunneling() tunneling.TunnelingAPI
func (*Supervisor) UnseedWorkload ¶
func (n *Supervisor) UnseedWorkload(hash string) error
Click to show internal directories.
Click to hide internal directories.