Documentation ¶
Index ¶
- type Option
- type PeerLister
- type Server
- func (s *Server) GetAgentEvents(req *observerpb.GetAgentEventsRequest, ...) error
- func (s *Server) GetDebugEvents(req *observerpb.GetDebugEventsRequest, ...) error
- func (s *Server) GetFlows(req *observerpb.GetFlowsRequest, stream observerpb.Observer_GetFlowsServer) error
- func (s *Server) GetNamespaces(ctx context.Context, req *observerpb.GetNamespacesRequest) (*observerpb.GetNamespacesResponse, error)
- func (s *Server) GetNodes(ctx context.Context, req *observerpb.GetNodesRequest) (*observerpb.GetNodesResponse, error)
- func (s *Server) ServerStatus(ctx context.Context, req *observerpb.ServerStatusRequest) (*observerpb.ServerStatusResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *options) error
Option customizes the configuration of the Manager.
func WithErrorAggregationWindow ¶
WithErrorAggregationWindow sets a time window during which errors with the same error message are coalesced. The aggregated error is forwarded to the downstream consumer either when the window expires or when a new, different error occurs (whichever happens first)
func WithLogger ¶
func WithLogger(l logrus.FieldLogger) Option
WithLogger sets the logger to use for logging.
func WithSortBufferDrainTimeout ¶
WithSortBufferDrainTimeout sets the sort buffer drain timeout value. For flows requests where the total number of flows cannot be determined (typically for flows requests in follow mode), a flow is taken out of the buffer and sent to the client after duration d if the buffer is not full. This value must be greater than 0. Setting this value too low would render the flows sorting operation ineffective. A value between 500 milliseconds and 3 seconds should be constitute a good choice in most cases.
func WithSortBufferMaxLen ¶
WithSortBufferMaxLen sets the maximum number of flows that can be buffered for sorting before being sent to the client. The provided value must be greater than 0 and is to be understood per client request. Therefore, it is advised to keep the value moderate (a value between 30 and 100 should constitute a good choice in most cases).
type PeerLister ¶
type PeerLister interface { // List returns a list of peers with active connections. If a peer cannot // be connected to; its Conn attribute must be nil. List() []poolTypes.Peer }
PeerLister is the interface that wraps the List method.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the observerpb.ObserverServer interface.
func NewServer ¶
func NewServer(peers PeerLister, options ...Option) (*Server, error)
NewServer creates a new Server.
func (*Server) GetAgentEvents ¶
func (s *Server) GetAgentEvents(req *observerpb.GetAgentEventsRequest, stream observerpb.Observer_GetAgentEventsServer) error
GetAgentEvents implements observerpb.ObserverServer.GetAgentEvents by proxying requests to the hubble instance the proxy is connected to.
func (*Server) GetDebugEvents ¶
func (s *Server) GetDebugEvents(req *observerpb.GetDebugEventsRequest, stream observerpb.Observer_GetDebugEventsServer) error
GetDebugEvents implements observerpb.ObserverServer.GetDebugEvents by proxying requests to the hubble instance the proxy is connected to.
func (*Server) GetFlows ¶
func (s *Server) GetFlows(req *observerpb.GetFlowsRequest, stream observerpb.Observer_GetFlowsServer) error
GetFlows implements observerpb.ObserverServer.GetFlows by proxying requests to the hubble instance the proxy is connected to.
func (*Server) GetNamespaces ¶
func (s *Server) GetNamespaces(ctx context.Context, req *observerpb.GetNamespacesRequest) (*observerpb.GetNamespacesResponse, error)
GetNamespaces implements observerpb.ObserverClient.GetNamespaces.
func (*Server) GetNodes ¶
func (s *Server) GetNodes(ctx context.Context, req *observerpb.GetNodesRequest) (*observerpb.GetNodesResponse, error)
GetNodes implements observerpb.ObserverClient.GetNodes.
func (*Server) ServerStatus ¶
func (s *Server) ServerStatus(ctx context.Context, req *observerpb.ServerStatusRequest) (*observerpb.ServerStatusResponse, error)
ServerStatus implements observerpb.ObserverServer.ServerStatus by aggregating the ServerStatus answer of all hubble peers.