Documentation ¶
Index ¶
- Variables
- type OnDecodedEvent
- type OnDecodedEventFunc
- type OnDecodedFlow
- type OnDecodedFlowFunc
- type OnFlowDelivery
- type OnFlowDeliveryFunc
- type OnGetFlows
- type OnGetFlowsFunc
- type OnMonitorEvent
- type OnMonitorEventFunc
- type OnServerInit
- type OnServerInitFunc
- type Option
- func WithMaxFlows(capacity container.Capacity) Option
- func WithMonitorBuffer(size int) Option
- func WithOnBuildFilter(f filters.OnBuildFilter) Option
- func WithOnBuildFilterFunc(f filters.OnBuildFilterFunc) Option
- func WithOnDecodedEvent(f OnDecodedEvent) Option
- func WithOnDecodedEventFunc(f func(context.Context, *v1.Event) (stop, error)) Option
- func WithOnDecodedFlow(f OnDecodedFlow) Option
- func WithOnDecodedFlowFunc(f func(context.Context, *pb.Flow) (stop, error)) Option
- func WithOnFlowDelivery(f OnFlowDelivery) Option
- func WithOnFlowDeliveryFunc(f OnFlowDeliveryFunc) Option
- func WithOnGetFlows(f OnGetFlows) Option
- func WithOnGetFlowsFunc(f OnGetFlowsFunc) Option
- func WithOnMonitorEvent(f OnMonitorEvent) Option
- func WithOnMonitorEventFunc(f func(context.Context, *observerTypes.MonitorEvent) (stop, error)) Option
- func WithOnServerInit(f OnServerInit) Option
- func WithOnServerInitFunc(f func(Server) error) Option
- type Options
- type Server
Constants ¶
This section is empty.
Variables ¶
var Default = Options{ MaxFlows: container.Capacity4095, MonitorBuffer: 1024, }
Default serves only as reference point for default values. Very useful for the CLI to pick these up instead of defining own defaults that need to be kept in sync.
Functions ¶
This section is empty.
Types ¶
type OnDecodedEvent ¶
OnDecodedEvent is invoked after an event has been decoded
type OnDecodedEventFunc ¶
OnDecodedEventFunc implements OnDecodedEvent for a single function
func (OnDecodedEventFunc) OnDecodedEvent ¶
OnDecodedEvent is invoked after a flow has been decoded
type OnDecodedFlow ¶
OnDecodedFlow is invoked after a flow has been decoded
type OnDecodedFlowFunc ¶
OnDecodedFlowFunc implements OnDecodedFlow for a single function
func (OnDecodedFlowFunc) OnDecodedFlow ¶
OnDecodedFlow is invoked after a flow has been decoded
type OnFlowDelivery ¶
OnFlowDelivery is invoked before a flow is delivered via the API
type OnFlowDeliveryFunc ¶
OnFlowDeliveryFunc implements OnFlowDelivery for a single function
func (OnFlowDeliveryFunc) OnFlowDelivery ¶
OnFlowDelivery is invoked before a flow is delivered via the API
type OnGetFlows ¶
type OnGetFlows interface {
OnGetFlows(context.Context, *observer.GetFlowsRequest) (context.Context, error)
}
OnGetFlows is invoked for each GetFlows call
type OnGetFlowsFunc ¶
OnGetFlowsFunc implements OnGetFlows for a single function
func (OnGetFlowsFunc) OnGetFlows ¶
func (f OnGetFlowsFunc) OnGetFlows(ctx context.Context, req *observer.GetFlowsRequest) (context.Context, error)
OnGetFlows is invoked for each GetFlows call
type OnMonitorEvent ¶
type OnMonitorEvent interface {
OnMonitorEvent(context.Context, *observerTypes.MonitorEvent) (stop, error)
}
OnMonitorEvent is invoked before each monitor event is decoded
type OnMonitorEventFunc ¶
type OnMonitorEventFunc func(context.Context, *observerTypes.MonitorEvent) (stop, error)
OnMonitorEventFunc implements OnMonitorEvent for a single function
func (OnMonitorEventFunc) OnMonitorEvent ¶
func (f OnMonitorEventFunc) OnMonitorEvent(ctx context.Context, event *observerTypes.MonitorEvent) (stop, error)
OnMonitorEvent is invoked before each monitor event is decoded
type OnServerInit ¶
OnServerInit is invoked after all server options have been applied
type OnServerInitFunc ¶
OnServerInitFunc implements OnServerInit for a single function
func (OnServerInitFunc) OnServerInit ¶
func (f OnServerInitFunc) OnServerInit(srv Server) error
OnServerInit is invoked after all server options have been applied
type Option ¶
Option customizes the configuration of the hubble server.
func WithMaxFlows ¶
WithMaxFlows that the ring buffer is initialized to hold.
func WithMonitorBuffer ¶
WithMonitorBuffer controls the size of the buffered channel between the monitor socket and the hubble ring buffer.
func WithOnBuildFilter ¶
func WithOnBuildFilter(f filters.OnBuildFilter) Option
WithOnBuildFilter adds a new callback to be invoked while building a flow filter
func WithOnBuildFilterFunc ¶
func WithOnBuildFilterFunc(f filters.OnBuildFilterFunc) Option
WithOnBuildFilterFunc adds a new callback to be invoked while building flow filters
func WithOnDecodedEvent ¶
func WithOnDecodedEvent(f OnDecodedEvent) Option
WithOnDecodedEvent adds a new callback to be invoked after decoding an event.
func WithOnDecodedEventFunc ¶
WithOnDecodedEventFunc adds a new callback to be invoked after decoding an event
func WithOnDecodedFlow ¶
func WithOnDecodedFlow(f OnDecodedFlow) Option
WithOnDecodedFlow adds a new callback to be invoked after decoding
func WithOnDecodedFlowFunc ¶
WithOnDecodedFlowFunc adds a new callback to be invoked after decoding
func WithOnFlowDelivery ¶
func WithOnFlowDelivery(f OnFlowDelivery) Option
WithOnFlowDelivery adds a new callback to be invoked before a flow is delivered via the API
func WithOnFlowDeliveryFunc ¶
func WithOnFlowDeliveryFunc(f OnFlowDeliveryFunc) Option
WithOnFlowDeliveryFunc adds a new callback to be invoked before a flow is delivered via the API
func WithOnGetFlows ¶
func WithOnGetFlows(f OnGetFlows) Option
WithOnGetFlows adds a new callback to be invoked for each GetFlows call
func WithOnGetFlowsFunc ¶
func WithOnGetFlowsFunc(f OnGetFlowsFunc) Option
WithOnGetFlowsFunc adds a new callback to be invoked for each GetFlows call
func WithOnMonitorEvent ¶
func WithOnMonitorEvent(f OnMonitorEvent) Option
WithOnMonitorEvent adds a new callback to be invoked before decoding
func WithOnMonitorEventFunc ¶
func WithOnMonitorEventFunc(f func(context.Context, *observerTypes.MonitorEvent) (stop, error)) Option
WithOnMonitorEventFunc adds a new callback to be invoked before decoding
func WithOnServerInit ¶
func WithOnServerInit(f OnServerInit) Option
WithOnServerInit adds a new callback to be invoked after server initialization
func WithOnServerInitFunc ¶
WithOnServerInitFunc adds a new callback to be invoked after server initialization
type Options ¶
type Options struct { MaxFlows container.Capacity // max number of flows that can be stored in the ring buffer MonitorBuffer int // buffer size for monitor payload OnServerInit []OnServerInit // invoked when the hubble server is initialized OnMonitorEvent []OnMonitorEvent // invoked before an event is decoded OnDecodedFlow []OnDecodedFlow // invoked after a flow has been decoded OnDecodedEvent []OnDecodedEvent // invoked after an event has been decoded OnBuildFilter []filters.OnBuildFilter // invoked while building a flow filter OnFlowDelivery []OnFlowDelivery // invoked before a flow is delivered via API OnGetFlows []OnGetFlows // invoked on new GetFlows API call }
Options stores all the configurations values for the hubble server.
type Server ¶
type Server interface { GetOptions() Options GetLogger() logrus.FieldLogger }
Server gives access to the Hubble server