Documentation
¶
Index ¶
- type ConnectHandler
- type CtrlAccepter
- func (self *CtrlAccepter) AcceptUnderlay(underlay channel.Underlay) error
- func (self *CtrlAccepter) Bind(binding channel.Binding) error
- func (self *CtrlAccepter) HandleGroupedUnderlay(underlay channel.Underlay, closeCallback func()) (channel.MultiChannel, error)
- func (self *CtrlAccepter) NewMultiListener() channel.UnderlayAcceptor
- type CtrlDialer
- func (self *CtrlDialer) Inspect(name string) (bool, *string, error)
- func (self *CtrlDialer) RouterConnected(r *model.Router)
- func (self *CtrlDialer) RouterCreated(id string)
- func (self *CtrlDialer) RouterDeleted(id string)
- func (self *CtrlDialer) RouterDisconnected(r *model.Router)
- func (self *CtrlDialer) RouterUpdated(id string)
- func (self *CtrlDialer) Run()
- func (self *CtrlDialer) Validate() ([]*mgmt_pb.ControllerDialerDetails, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectHandler ¶
type ConnectHandler struct {
// contains filtered or unexported fields
}
func NewConnectHandler ¶
func NewConnectHandler(identity identity.Identity, network *network.Network, signingCertRoots []*x509.Certificate) *ConnectHandler
NewConnectHandler returns a ConnectHandler that admits routers whose leaf certificate chains either to the controller's own CA bundle or to signingCertRoots, the edge enrollment signing CA bundle. signingCertRoots may be empty, in which case only the controller's bundle is trusted.
func (*ConnectHandler) HandleConnection ¶
func (self *ConnectHandler) HandleConnection(hello *channel.Hello, certificates []*x509.Certificate) error
func (*ConnectHandler) SetSeparatelyValidatedChannelTypes ¶ added in v2.0.2
func (self *ConnectHandler) SetSeparatelyValidatedChannelTypes(types map[string]struct{})
SetSeparatelyValidatedChannelTypes records the control-channel type headers that are dispatched to a separate, self-validating acceptor (e.g. the raft mesh). Connections carrying one of these types are skipped by HandleConnection; everything else - router control channel types, unrecognized types, and legacy (no type header) connections, all of which the dispatcher routes to the router control acceptor - is validated here. This must be populated before the listener begins accepting.
type CtrlAccepter ¶
type CtrlAccepter struct {
// contains filtered or unexported fields
}
func NewCtrlAccepter ¶
func NewCtrlAccepter(network *network.Network, xctrls []xctrl.Xctrl, options *channel.Options, heartbeatOptions *channel.HeartbeatOptions, traceHandler *channel.TraceHandler) *CtrlAccepter
func (*CtrlAccepter) AcceptUnderlay ¶
func (self *CtrlAccepter) AcceptUnderlay(underlay channel.Underlay) error
AcceptUnderlay handles incoming ungrouped connections from routers that don't support multi-underlay control channels (backward compatibility).
func (*CtrlAccepter) HandleGroupedUnderlay ¶
func (self *CtrlAccepter) HandleGroupedUnderlay(underlay channel.Underlay, closeCallback func()) (channel.MultiChannel, error)
HandleGroupedUnderlay handles incoming grouped connections from routers that support multi-underlay control channels. It creates a MultiChannel with ListenerCtrlChannel.
func (*CtrlAccepter) NewMultiListener ¶
func (self *CtrlAccepter) NewMultiListener() channel.UnderlayAcceptor
NewMultiListener returns an acceptor that handles both grouped (multi-underlay) and ungrouped (single underlay) connections from routers.
type CtrlDialer ¶
type CtrlDialer struct {
// contains filtered or unexported fields
}
CtrlDialer manages outbound ctrl channel connections to routers that advertise ctrl channel listener addresses. It runs a single-threaded event loop that tracks per-router dial state and dispatches dial attempts to a worker pool with exponential backoff on failure.
func NewCtrlDialer ¶
func NewCtrlDialer( config *config.CtrlDialerConfig, network *network.Network, ctrlAccepter *CtrlAccepter, ctrlId *identity.TokenId, headers map[int32][]byte, closeNotify <-chan struct{}, metricsRegistry metrics.Registry, ) *CtrlDialer
NewCtrlDialer creates a new CtrlDialer. Call Run to start the event loop.
func (*CtrlDialer) Inspect ¶
func (self *CtrlDialer) Inspect(name string) (bool, *string, error)
Inspect handles inspection requests for the ctrl dialer, returning current dial state as JSON.
func (*CtrlDialer) RouterConnected ¶
func (self *CtrlDialer) RouterConnected(r *model.Router)
RouterConnected notifies the dialer that a router has connected (e.g. via inbound accept).
func (*CtrlDialer) RouterCreated ¶
func (self *CtrlDialer) RouterCreated(id string)
RouterCreated notifies the dialer that a new router has been created.
func (*CtrlDialer) RouterDeleted ¶
func (self *CtrlDialer) RouterDeleted(id string)
RouterDeleted notifies the dialer that a router has been deleted.
func (*CtrlDialer) RouterDisconnected ¶
func (self *CtrlDialer) RouterDisconnected(r *model.Router)
RouterDisconnected notifies the dialer that a router's ctrl channel has been lost.
func (*CtrlDialer) RouterUpdated ¶
func (self *CtrlDialer) RouterUpdated(id string)
RouterUpdated notifies the dialer that a router's configuration has changed.
func (*CtrlDialer) Run ¶
func (self *CtrlDialer) Run()
Run starts the dialer event loop. It blocks until closeNotify is closed.
func (*CtrlDialer) Validate ¶
func (self *CtrlDialer) Validate() ([]*mgmt_pb.ControllerDialerDetails, error)
Validate cross-references dial states against the router store and returns per-router diagnostic details.
Source Files
¶
- accept.go
- alert.go
- base.go
- bind.go
- circuit_confirmation.go
- circuit_request.go
- close.go
- connect.go
- create_terminator.go
- decommission.go
- dequiesce_router.go
- dial_events.go
- dial_state.go
- dial_state_heap.go
- dialer.go
- fault.go
- inspect.go
- link_state.go
- metrics.go
- ping.go
- quiesce_router.go
- remove_terminator.go
- remove_terminators.go
- route_result.go
- router_link.go
- send_cluster_members.go
- trace.go
- update_router_interfaces.go
- update_terminator.go
- verify_router.go