Documentation ¶
Index ¶
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 PeerListReporter ¶
type PeerListReporter interface { PeerLister PeerReporter }
PeerListReporter is the interface that groups the List and ReportOffline methods.
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 PeerReporter ¶
type PeerReporter interface { // ReportOffline allows the caller to report a peer as being offline. The // peer is identified by its name. ReportOffline(name string) }
PeerReporter is the interface that wraps the ReportOffline method.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the observerpb.ObserverServer interface.
func NewServer ¶
func NewServer(peers PeerListReporter, options ...Option) (*Server, error)
NewServer creates a new Server.
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) 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.