Documentation ¶
Overview ¶
Package eventchannel provides implementations based on event channels of:
networkservice.MonitorConnectionClient networkservice.MonitorConnectionServer networkservice.MonitorConnection_MonitorConnectionsClient networkservice.MonitorConnection_MonitorConnectionsServer
Package eventchannel provides API for creating monitoring components via golang channels
Index ¶
- func NewMonitorConnectionClient(eventCh <-chan *networkservice.ConnectionEvent) networkservice.MonitorConnectionClient
- func NewMonitorConnectionMonitorConnectionsClient(ctx context.Context, eventCh <-chan *networkservice.ConnectionEvent) networkservice.MonitorConnection_MonitorConnectionsClient
- func NewMonitorConnectionMonitorConnectionsServer(ctx context.Context, eventCh chan<- *networkservice.ConnectionEvent) networkservice.MonitorConnection_MonitorConnectionsServer
- func NewMonitorServer(eventCh <-chan *networkservice.ConnectionEvent, ...) networkservice.MonitorConnectionServer
- type MonitorConnectionServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMonitorConnectionClient ¶
func NewMonitorConnectionClient(eventCh <-chan *networkservice.ConnectionEvent) networkservice.MonitorConnectionClient
NewMonitorConnectionClient - returns networkservice.MonitorConnectionClient
eventCh - channel that provides events to feed the Recv function when an event is sent on the eventCh, all networkservice.MonitorConnection_MonitorConnectionsClient returned from calling MonitorConnections receive the event. Note: Does not perform filtering basedon MonitorScopeSelector
func NewMonitorConnectionMonitorConnectionsClient ¶
func NewMonitorConnectionMonitorConnectionsClient(ctx context.Context, eventCh <-chan *networkservice.ConnectionEvent) networkservice.MonitorConnection_MonitorConnectionsClient
NewMonitorConnectionMonitorConnectionsClient - returns a networkservice.MonitorConnection_MonitorConnectionsClient
ctx - context which if Done will cause Recv to return. eventCh - when an event is sent on eventCh, it is returned by the call to Recv on the networkservice.MonitorConnection_MonitorConnectionsClient
func NewMonitorConnectionMonitorConnectionsServer ¶
func NewMonitorConnectionMonitorConnectionsServer(ctx context.Context, eventCh chan<- *networkservice.ConnectionEvent) networkservice.MonitorConnection_MonitorConnectionsServer
NewMonitorConnectionMonitorConnectionsServer - returns a networkservice.MonitorConnection_MonitorConnectionsServer
eventCh - when an event is passed to the Send() method, it is inserted into eventCh
func NewMonitorServer ¶
func NewMonitorServer(eventCh <-chan *networkservice.ConnectionEvent, options ...MonitorConnectionServerOption) networkservice.MonitorConnectionServer
NewMonitorServer - returns a networkservice.MonitorConnectionServer
eventCh - when Send() is called on any of the NewMonitorConnection_MonitorConnectionsServers returned by a call to MonitorConnections, it is inserted into eventCh
Types ¶
type MonitorConnectionServerOption ¶
type MonitorConnectionServerOption interface {
// contains filtered or unexported methods
}
MonitorConnectionServerOption applies specific parameters for MonitorConnectionServer
func WithConnectChannel ¶
func WithConnectChannel(connectCh chan<- int) MonitorConnectionServerOption
WithConnectChannel adds for MonitorConnectionServer an option for monitoring connection count