Documentation ¶
Index ¶
- Variables
- func NewNamespaceManager() *namespaceManager
- type LocalObserverServer
- func (s *LocalObserverServer) GetAgentEvents(req *observerpb.GetAgentEventsRequest, ...) (err error)
- func (s *LocalObserverServer) GetDebugEvents(req *observerpb.GetDebugEventsRequest, ...) (err error)
- func (s *LocalObserverServer) GetEventsChannel() chan *observerTypes.MonitorEvent
- func (s *LocalObserverServer) GetFlows(req *observerpb.GetFlowsRequest, server observerpb.Observer_GetFlowsServer) (err error)
- func (s *LocalObserverServer) GetLogger() logrus.FieldLogger
- func (s *LocalObserverServer) GetNamespaces(ctx context.Context, req *observerpb.GetNamespacesRequest) (*observerpb.GetNamespacesResponse, error)
- func (s *LocalObserverServer) GetNodes(ctx context.Context, req *observerpb.GetNodesRequest) (*observerpb.GetNodesResponse, error)
- func (s *LocalObserverServer) GetOptions() observeroption.Options
- func (s *LocalObserverServer) GetPayloadParser() *parser.Parser
- func (s *LocalObserverServer) GetRingBuffer() *container.Ring
- func (s *LocalObserverServer) GetStopped() chan struct{}
- func (s *LocalObserverServer) ServerStatus(ctx context.Context, req *observerpb.ServerStatusRequest) (*observerpb.ServerStatusResponse, error)
- func (s *LocalObserverServer) Start()
- type NamespaceManager
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (s *LocalObserverServer) GetAgentEvents( req *observerpb.GetAgentEventsRequest, server observerpb.Observer_GetAgentEventsServer, ) (err error)
GetAgentEvents implements observerpb.ObserverClient.GetAgentEvents.
func (*LocalObserverServer) GetDebugEvents ¶
func (s *LocalObserverServer) GetDebugEvents( req *observerpb.GetDebugEventsRequest, server observerpb.Observer_GetDebugEventsServer, ) (err error)
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 ¶
func (s *LocalObserverServer) GetFlows( req *observerpb.GetFlowsRequest, server observerpb.Observer_GetFlowsServer, ) (err error)
GetFlows implements the proto method for client requests.
func (*LocalObserverServer) GetLogger ¶
func (s *LocalObserverServer) GetLogger() logrus.FieldLogger
GetLogger implements GRPCServer.GetLogger.
func (*LocalObserverServer) GetNamespaces ¶
func (s *LocalObserverServer) GetNamespaces(ctx context.Context, req *observerpb.GetNamespacesRequest) (*observerpb.GetNamespacesResponse, error)
GetNamespaces implements observerpb.ObserverClient.GetNamespaces.
func (*LocalObserverServer) GetNodes ¶
func (s *LocalObserverServer) GetNodes(ctx context.Context, req *observerpb.GetNodesRequest) (*observerpb.GetNodesResponse, error)
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 ¶
func (s *LocalObserverServer) ServerStatus( ctx context.Context, req *observerpb.ServerStatusRequest, ) (*observerpb.ServerStatusResponse, error)
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) }