Documentation
¶
Index ¶
- Variables
- type CiliumDaemon
- type OnDecodedFlow
- type OnDecodedFlowFunc
- type OnMonitorEvent
- type OnMonitorEventFunc
- type OnServerInit
- type OnServerInitFunc
- type Option
- func WithCiliumDaemon(daemon CiliumDaemon) Option
- func WithMaxFlows(size int) Option
- func WithMonitorBuffer(size int) Option
- func WithOnBuildFilter(f filters.OnBuildFilter) Option
- func WithOnBuildFilterFunc(f filters.OnBuildFilterFunc) Option
- func WithOnDecodedFlow(f OnDecodedFlow) Option
- func WithOnDecodedFlowFunc(f func(context.Context, *pb.Flow) (stop, error)) Option
- func WithOnMonitorEvent(f OnMonitorEvent) Option
- func WithOnMonitorEventFunc(f func(context.Context, *pb.Payload) (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: 131071,
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 CiliumDaemon ¶
type CiliumDaemon interface {
DebugEnabled() bool
}
CiliumDaemon is a reference to the Cilium's Daemon when running inside Cilium
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 OnMonitorEvent ¶
OnMonitorEvent is invoked before each monitor event is decoded
type OnMonitorEventFunc ¶
OnMonitorEventFunc implements OnMonitorEvent for a single function
func (OnMonitorEventFunc) OnMonitorEvent ¶
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 WithCiliumDaemon ¶
func WithCiliumDaemon(daemon CiliumDaemon) Option
WithCiliumDaemon provides access to the Cilium daemon via downcast
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 ¶ added in v0.5.1
func WithOnBuildFilter(f filters.OnBuildFilter) Option
WithOnBuildFilter adds a new callback to be invoked while building a flow filter
func WithOnBuildFilterFunc ¶ added in v0.5.1
func WithOnBuildFilterFunc(f filters.OnBuildFilterFunc) Option
WithOnBuildFilterFunc adds a new callback to be invoked while building flow filters
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 WithOnMonitorEvent ¶
func WithOnMonitorEvent(f OnMonitorEvent) Option
WithOnMonitorEvent adds a new callback to be invoked before decoding
func WithOnMonitorEventFunc ¶
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 {
// Both sizes should really be uint32 but it's better saved for a single
// refactor commit.
MaxFlows int // max number of flows that can be stored in the ring buffer
MonitorBuffer int // buffer size for monitor payload
CiliumDaemon CiliumDaemon // when running inside Cilium, contains a reference to the daemon
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
OnBuildFilter []filters.OnBuildFilter // invoked while building a flow filter
}
Options stores all the configurations values for the hubble server.