observer

package
v1.14.0-snapshot.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions []observeroption.Option

DefaultOptions to include in the server. Other packages may extend this in their init() function.

Functions

func NewNamespaceManager

func NewNamespaceManager() *namespaceManager

Types

type LocalObserverServer

type LocalObserverServer struct {
	// contains filtered or unexported fields
}

LocalObserverServer is an implementation of the server.Observer interface that's meant to be run embedded inside the Cilium process. It ignores all the state change events since the state is available locally.

func NewLocalServer

func NewLocalServer(
	payloadParser *parser.Parser,
	namespaceManager NamespaceManager,
	logger logrus.FieldLogger,
	options ...observeroption.Option,
) (*LocalObserverServer, error)

NewLocalServer returns a new local observer server.

func (*LocalObserverServer) GetAgentEvents

GetAgentEvents implements observerpb.ObserverClient.GetAgentEvents.

func (*LocalObserverServer) GetDebugEvents

GetDebugEvents implements observerpb.ObserverClient.GetDebugEvents.

func (*LocalObserverServer) GetEventsChannel

func (s *LocalObserverServer) GetEventsChannel() chan *observerTypes.MonitorEvent

GetEventsChannel returns the event channel to receive flowpb.Payload events.

func (*LocalObserverServer) GetFlows

GetFlows implements the proto method for client requests.

func (*LocalObserverServer) GetLogger

func (s *LocalObserverServer) GetLogger() logrus.FieldLogger

GetLogger implements GRPCServer.GetLogger.

func (*LocalObserverServer) GetNamespaces

GetNamespaces implements observerpb.ObserverClient.GetNamespaces.

func (*LocalObserverServer) GetNodes

GetNodes implements observerpb.ObserverClient.GetNodes.

func (*LocalObserverServer) GetOptions

func (s *LocalObserverServer) GetOptions() observeroption.Options

GetOptions implements serveroptions.Server.GetOptions.

func (*LocalObserverServer) GetPayloadParser

func (s *LocalObserverServer) GetPayloadParser() *parser.Parser

GetPayloadParser implements GRPCServer.GetPayloadParser.

func (*LocalObserverServer) GetRingBuffer

func (s *LocalObserverServer) GetRingBuffer() *container.Ring

GetRingBuffer implements GRPCServer.GetRingBuffer.

func (*LocalObserverServer) GetStopped

func (s *LocalObserverServer) GetStopped() chan struct{}

GetStopped implements GRPCServer.GetStopped.

func (*LocalObserverServer) ServerStatus

ServerStatus should have a comment, apparently. It returns the server status.

func (*LocalObserverServer) Start

func (s *LocalObserverServer) Start()

Start implements GRPCServer.Start.

type NamespaceManager

type NamespaceManager interface {
	GetNamespaces() []*observerpb.Namespace
	AddNamespace(*observerpb.Namespace)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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