eventchannel

package
v1.14.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

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

Jump to

Keyboard shortcuts

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