monitor

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

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