Documentation ¶
Overview ¶
Package monitor provides a NetworkServiceServer chain element to provide a monitor server that reflects the connections actually in the NetworkServiceServer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(chainCtx context.Context, monitorServerPtr *networkservice.MonitorConnectionServer) networkservice.NetworkServiceServer
NewServer - creates a NetworkServiceServer chain element that will properly update a MonitorConnectionServer
- monitorServerPtr - *networkservice.MonitorConnectionServer. Since networkservice.MonitorConnectionServer is an interface (and thus a pointer) *networkservice.MonitorConnectionServer is a double pointer. Meaning it points to a place that points to a place that implements networkservice.MonitorConnectionServer This is done so that we can preserve the return of networkservice.NetworkServer and use NewServer(...) as any other chain element constructor, but also get back a networkservice.MonitorConnectionServer that can be used either standalone or in a networkservice.MonitorConnectionServer chain chainCtx - context for lifecycle management
Types ¶
type EventConsumer ¶ added in v1.5.0
type EventConsumer interface {
Send(event *networkservice.ConnectionEvent) (err error)
}
EventConsumer - interface for monitor events sending
func LoadEventConsumer ¶ added in v1.5.0
func LoadEventConsumer(ctx context.Context, isClient bool) (value EventConsumer, ok bool)
LoadEventConsumer loads EventConsumer stored in per Connection.Id metadata. The loaded result reports whether the key was present.
Click to show internal directories.
Click to hide internal directories.