Documentation ¶
Index ¶
- Variables
- func NewWatchdog(deregCh chan<- deregistrationEvent) stats.Handler
- type DataplaneEventsServer
- type EventsClient
- type EventsServer
- type Watchdog
- func (h *Watchdog) HandleConn(c context.Context, s stats.ConnStats)
- func (h *Watchdog) HandleRPC(ctx context.Context, _ stats.RPCStats)
- func (h *Watchdog) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (h *Watchdog) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoPeer is returned when no peer was found in the gRPC context. ErrNoPeer = errors.New("no peer found in gRPC context") // ErrTLSCerts is returned for any TLS certificate related issue ErrTLSCerts = errors.New("tls certificate error") )
View Source
var ( ErrPodNodeNameNil = fmt.Errorf("pod and node name must be set") ErrAddressNil = fmt.Errorf("address must be set") )
Functions ¶
func NewWatchdog ¶
NewWatchdog creates a new Watchdog instance
Types ¶
type DataplaneEventsServer ¶
type DataplaneEventsServer struct { protos.UnimplementedDataplaneEventsServer // contains filtered or unexported fields }
DataplaneEventsServer is the gRPC server for the DataplaneEvents service
func NewServer ¶
func NewServer(ctx context.Context, ch chan clientStreamConnection) *DataplaneEventsServer
NewServer creates a new DataplaneEventsServer instance
func (*DataplaneEventsServer) Connect ¶
func (d *DataplaneEventsServer) Connect(m *protos.DatapathPodMetadata, stream protos.DataplaneEvents_ConnectServer) error
Connect is called when a client connects to the server
type EventsClient ¶
type EventsClient struct { protos.DataplaneEventsClient // contains filtered or unexported fields }
EventsClient is a client for the DataplaneEvents service
func NewEventsClient ¶
func NewEventsClient(ctx context.Context, pod, node, addr string) (*EventsClient, error)
func (*EventsClient) EventsChannel ¶
func (c *EventsClient) EventsChannel() chan *protos.Events
func (*EventsClient) Start ¶
func (c *EventsClient) Start(stopCh <-chan struct{}) error
type EventsServer ¶
type EventsServer struct { // Server is the gRPC server Server protos.DataplaneEventsServer // Watchdog is the watchdog for the gRPC server that implements the // gRPC stats handler interface Watchdog stats.Handler // Registrations is a map of dataplane pod address to their associate connection stream Registrations map[string]clientStreamConnection // contains filtered or unexported fields }
EventsServer contains of the grpc server and the watchdog server
func NewEventsServer ¶
NewEventsServer creates an instance of the EventsServer
func (*EventsServer) InputChannel ¶
func (m *EventsServer) InputChannel() chan *protos.Events
InputChannel returns the input channel for the manager
func (*EventsServer) Start ¶
func (m *EventsServer) Start(stopCh <-chan struct{}) error
Start starts the events manager (grpc server and watchdog)
Click to show internal directories.
Click to hide internal directories.