Documentation
¶
Index ¶
- func ExtractId(name string, prefix string, suffixLen int) (string, string)
- func MarshalJson(v interface{}) ([]byte, error)
- func NewAMQPEventLogger(formatterFactory LoggingHandlerFactory, config map[interface{}]interface{}) (interface{}, error)
- func NewFileEventLogger(formatterFactory LoggingHandlerFactory, stdout bool, ...) (interface{}, error)
- func NewWriterEventSink(out io.Writer) event.FormattedEventSink
- type AMQPEventLoggerFactory
- type BaseFormatter
- type Dispatcher
- func (self *Dispatcher) AcceptCircuitEvent(event *event.CircuitEvent)
- func (self *Dispatcher) AcceptClusterEvent(event *event.ClusterEvent)
- func (self *Dispatcher) AcceptEntityChangeEvent(event *event.EntityChangeEvent)
- func (self *Dispatcher) AcceptLinkEvent(event *event.LinkEvent)
- func (self *Dispatcher) AcceptMetricsEvent(event *event.MetricsEvent)
- func (self *Dispatcher) AcceptMetricsMsg(msg *metrics_pb.MetricsMessage)
- func (self *Dispatcher) AcceptRouterEvent(event *event.RouterEvent)
- func (self *Dispatcher) AcceptServiceEvent(event *event.ServiceEvent)
- func (self *Dispatcher) AcceptTerminatorEvent(event *event.TerminatorEvent)
- func (self *Dispatcher) AcceptUsageEvent(event *event.UsageEvent)
- func (self *Dispatcher) AcceptUsageEventV3(event *event.UsageEventV3)
- func (self *Dispatcher) AddCircuitEventHandler(handler event.CircuitEventHandler)
- func (self *Dispatcher) AddClusterEventHandler(handler event.ClusterEventHandler)
- func (self *Dispatcher) AddEntityChangeEventHandler(handler event.EntityChangeEventHandler)
- func (self *Dispatcher) AddEntityChangeSource(store boltz.Store)
- func (self *Dispatcher) AddGlobalEntityChangeMetadata(k string, v any)
- func (self *Dispatcher) AddLinkEventHandler(handler event.LinkEventHandler)
- func (self *Dispatcher) AddMetricsEventHandler(handler event.MetricsEventHandler)
- func (self *Dispatcher) AddMetricsMapper(mapper event.MetricsMapper)
- func (self *Dispatcher) AddMetricsMessageHandler(handler event.MetricsMessageHandler)
- func (self *Dispatcher) AddRouterEventHandler(handler event.RouterEventHandler)
- func (self *Dispatcher) AddServiceEventHandler(handler event.ServiceEventHandler)
- func (self *Dispatcher) AddTerminatorEventHandler(handler event.TerminatorEventHandler)
- func (self *Dispatcher) AddUsageEventHandler(handler event.UsageEventHandler)
- func (self *Dispatcher) AddUsageEventV3Handler(handler event.UsageEventV3Handler)
- func (self *Dispatcher) GetFormatterFactory(formatType string) event.FormatterFactory
- func (self *Dispatcher) InitializeNetworkEvents(n *network.Network)
- func (self *Dispatcher) NewFilteredMetricsAdapter(sourceFilter *regexp.Regexp, metricFilter *regexp.Regexp, ...) event.MetricsMessageHandler
- func (self *Dispatcher) ProcessSubscriptions(handler interface{}, subscriptions []*event.Subscription) error
- func (self *Dispatcher) RegisterEventHandlerFactory(eventHandlerType string, factory event.HandlerFactory)
- func (self *Dispatcher) RegisterEventType(eventType string, typeRegistrar event.TypeRegistrar)
- func (self *Dispatcher) RegisterEventTypeFunctions(eventType string, registrationHandler event.RegistrationHandler, ...)
- func (self *Dispatcher) RegisterFormatterFactory(formatType string, factory event.FormatterFactory)
- func (self *Dispatcher) RemoveAllSubscriptions(handler interface{})
- func (self *Dispatcher) RemoveCircuitEventHandler(handler event.CircuitEventHandler)
- func (self *Dispatcher) RemoveClusterEventHandler(handler event.ClusterEventHandler)
- func (self *Dispatcher) RemoveEntityChangeEventHandler(handler event.EntityChangeEventHandler)
- func (self *Dispatcher) RemoveLinkEventHandler(handler event.LinkEventHandler)
- func (self *Dispatcher) RemoveMetricsEventHandler(handler event.MetricsEventHandler)
- func (self *Dispatcher) RemoveMetricsMessageHandler(handler event.MetricsMessageHandler)
- func (self *Dispatcher) RemoveRouterEventHandler(handler event.RouterEventHandler)
- func (self *Dispatcher) RemoveServiceEventHandler(handler event.ServiceEventHandler)
- func (self *Dispatcher) RemoveTerminatorEventHandler(handler event.TerminatorEventHandler)
- func (self *Dispatcher) RemoveUsageEventHandler(handler event.UsageEventHandler)
- func (self *Dispatcher) RemoveUsageEventV3Handler(handler event.UsageEventV3Handler)
- func (self *Dispatcher) WireEventHandlers(eventHandlerConfigs []*EventHandlerConfig) error
- type EventHandlerConfig
- type FileEventLoggerFactory
- type FormatterEvent
- type JsonCircuitEvent
- type JsonClusterEvent
- type JsonEntityChangeEvent
- type JsonFormatter
- func (formatter *JsonFormatter) AcceptCircuitEvent(evt *event.CircuitEvent)
- func (formatter *JsonFormatter) AcceptClusterEvent(evt *event.ClusterEvent)
- func (formatter *JsonFormatter) AcceptEntityChangeEvent(evt *event.EntityChangeEvent)
- func (formatter *JsonFormatter) AcceptLinkEvent(evt *event.LinkEvent)
- func (formatter *JsonFormatter) AcceptMetricsEvent(evt *event.MetricsEvent)
- func (formatter *JsonFormatter) AcceptRouterEvent(evt *event.RouterEvent)
- func (formatter *JsonFormatter) AcceptServiceEvent(evt *event.ServiceEvent)
- func (formatter *JsonFormatter) AcceptTerminatorEvent(evt *event.TerminatorEvent)
- func (formatter *JsonFormatter) AcceptUsageEvent(evt *event.UsageEvent)
- func (formatter *JsonFormatter) AcceptUsageEventV3(evt *event.UsageEventV3)
- type JsonLinkEvent
- type JsonMetricsEvent
- type JsonRouterEvent
- type JsonServiceEvent
- type JsonTerminatorEvent
- type JsonUsageEvent
- type JsonUsageEventV3
- type LoggingHandlerFactory
- type PrometheusMetricsEvent
- type StdOutLoggerFactory
- type WriterEventSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalJson ¶
func NewAMQPEventLogger ¶
func NewAMQPEventLogger(formatterFactory LoggingHandlerFactory, config map[interface{}]interface{}) (interface{}, error)
func NewFileEventLogger ¶
func NewFileEventLogger(formatterFactory LoggingHandlerFactory, stdout bool, config map[interface{}]interface{}) (interface{}, error)
func NewWriterEventSink ¶
func NewWriterEventSink(out io.Writer) event.FormattedEventSink
Types ¶
type AMQPEventLoggerFactory ¶
type AMQPEventLoggerFactory struct{}
func (AMQPEventLoggerFactory) NewEventHandler ¶
func (AMQPEventLoggerFactory) NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
type BaseFormatter ¶
type BaseFormatter struct {
// contains filtered or unexported fields
}
func (*BaseFormatter) AcceptLoggingEvent ¶
func (f *BaseFormatter) AcceptLoggingEvent(event FormatterEvent)
func (*BaseFormatter) Close ¶
func (f *BaseFormatter) Close() error
func (*BaseFormatter) Run ¶
func (f *BaseFormatter) Run()
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(closeNotify <-chan struct{}) *Dispatcher
func (*Dispatcher) AcceptCircuitEvent ¶
func (self *Dispatcher) AcceptCircuitEvent(event *event.CircuitEvent)
func (*Dispatcher) AcceptClusterEvent ¶
func (self *Dispatcher) AcceptClusterEvent(event *event.ClusterEvent)
func (*Dispatcher) AcceptEntityChangeEvent ¶
func (self *Dispatcher) AcceptEntityChangeEvent(event *event.EntityChangeEvent)
func (*Dispatcher) AcceptLinkEvent ¶
func (self *Dispatcher) AcceptLinkEvent(event *event.LinkEvent)
func (*Dispatcher) AcceptMetricsEvent ¶
func (self *Dispatcher) AcceptMetricsEvent(event *event.MetricsEvent)
func (*Dispatcher) AcceptMetricsMsg ¶
func (self *Dispatcher) AcceptMetricsMsg(msg *metrics_pb.MetricsMessage)
func (*Dispatcher) AcceptRouterEvent ¶
func (self *Dispatcher) AcceptRouterEvent(event *event.RouterEvent)
func (*Dispatcher) AcceptServiceEvent ¶
func (self *Dispatcher) AcceptServiceEvent(event *event.ServiceEvent)
func (*Dispatcher) AcceptTerminatorEvent ¶
func (self *Dispatcher) AcceptTerminatorEvent(event *event.TerminatorEvent)
func (*Dispatcher) AcceptUsageEvent ¶
func (self *Dispatcher) AcceptUsageEvent(event *event.UsageEvent)
func (*Dispatcher) AcceptUsageEventV3 ¶
func (self *Dispatcher) AcceptUsageEventV3(event *event.UsageEventV3)
func (*Dispatcher) AddCircuitEventHandler ¶
func (self *Dispatcher) AddCircuitEventHandler(handler event.CircuitEventHandler)
func (*Dispatcher) AddClusterEventHandler ¶
func (self *Dispatcher) AddClusterEventHandler(handler event.ClusterEventHandler)
func (*Dispatcher) AddEntityChangeEventHandler ¶
func (self *Dispatcher) AddEntityChangeEventHandler(handler event.EntityChangeEventHandler)
func (*Dispatcher) AddEntityChangeSource ¶
func (self *Dispatcher) AddEntityChangeSource(store boltz.Store)
func (*Dispatcher) AddGlobalEntityChangeMetadata ¶
func (self *Dispatcher) AddGlobalEntityChangeMetadata(k string, v any)
func (*Dispatcher) AddLinkEventHandler ¶
func (self *Dispatcher) AddLinkEventHandler(handler event.LinkEventHandler)
func (*Dispatcher) AddMetricsEventHandler ¶
func (self *Dispatcher) AddMetricsEventHandler(handler event.MetricsEventHandler)
func (*Dispatcher) AddMetricsMapper ¶
func (self *Dispatcher) AddMetricsMapper(mapper event.MetricsMapper)
func (*Dispatcher) AddMetricsMessageHandler ¶
func (self *Dispatcher) AddMetricsMessageHandler(handler event.MetricsMessageHandler)
func (*Dispatcher) AddRouterEventHandler ¶
func (self *Dispatcher) AddRouterEventHandler(handler event.RouterEventHandler)
func (*Dispatcher) AddServiceEventHandler ¶
func (self *Dispatcher) AddServiceEventHandler(handler event.ServiceEventHandler)
func (*Dispatcher) AddTerminatorEventHandler ¶
func (self *Dispatcher) AddTerminatorEventHandler(handler event.TerminatorEventHandler)
func (*Dispatcher) AddUsageEventHandler ¶
func (self *Dispatcher) AddUsageEventHandler(handler event.UsageEventHandler)
func (*Dispatcher) AddUsageEventV3Handler ¶
func (self *Dispatcher) AddUsageEventV3Handler(handler event.UsageEventV3Handler)
func (*Dispatcher) GetFormatterFactory ¶
func (self *Dispatcher) GetFormatterFactory(formatType string) event.FormatterFactory
func (*Dispatcher) InitializeNetworkEvents ¶
func (self *Dispatcher) InitializeNetworkEvents(n *network.Network)
func (*Dispatcher) NewFilteredMetricsAdapter ¶
func (self *Dispatcher) NewFilteredMetricsAdapter(sourceFilter *regexp.Regexp, metricFilter *regexp.Regexp, handler event.MetricsEventHandler) event.MetricsMessageHandler
func (*Dispatcher) ProcessSubscriptions ¶
func (self *Dispatcher) ProcessSubscriptions(handler interface{}, subscriptions []*event.Subscription) error
func (*Dispatcher) RegisterEventHandlerFactory ¶
func (self *Dispatcher) RegisterEventHandlerFactory(eventHandlerType string, factory event.HandlerFactory)
func (*Dispatcher) RegisterEventType ¶
func (self *Dispatcher) RegisterEventType(eventType string, typeRegistrar event.TypeRegistrar)
func (*Dispatcher) RegisterEventTypeFunctions ¶
func (self *Dispatcher) RegisterEventTypeFunctions(eventType string, registrationHandler event.RegistrationHandler, unregistrationHandler event.UnregistrationHandler)
func (*Dispatcher) RegisterFormatterFactory ¶
func (self *Dispatcher) RegisterFormatterFactory(formatType string, factory event.FormatterFactory)
func (*Dispatcher) RemoveAllSubscriptions ¶
func (self *Dispatcher) RemoveAllSubscriptions(handler interface{})
func (*Dispatcher) RemoveCircuitEventHandler ¶
func (self *Dispatcher) RemoveCircuitEventHandler(handler event.CircuitEventHandler)
func (*Dispatcher) RemoveClusterEventHandler ¶
func (self *Dispatcher) RemoveClusterEventHandler(handler event.ClusterEventHandler)
func (*Dispatcher) RemoveEntityChangeEventHandler ¶
func (self *Dispatcher) RemoveEntityChangeEventHandler(handler event.EntityChangeEventHandler)
func (*Dispatcher) RemoveLinkEventHandler ¶
func (self *Dispatcher) RemoveLinkEventHandler(handler event.LinkEventHandler)
func (*Dispatcher) RemoveMetricsEventHandler ¶
func (self *Dispatcher) RemoveMetricsEventHandler(handler event.MetricsEventHandler)
func (*Dispatcher) RemoveMetricsMessageHandler ¶
func (self *Dispatcher) RemoveMetricsMessageHandler(handler event.MetricsMessageHandler)
func (*Dispatcher) RemoveRouterEventHandler ¶
func (self *Dispatcher) RemoveRouterEventHandler(handler event.RouterEventHandler)
func (*Dispatcher) RemoveServiceEventHandler ¶
func (self *Dispatcher) RemoveServiceEventHandler(handler event.ServiceEventHandler)
func (*Dispatcher) RemoveTerminatorEventHandler ¶
func (self *Dispatcher) RemoveTerminatorEventHandler(handler event.TerminatorEventHandler)
func (*Dispatcher) RemoveUsageEventHandler ¶
func (self *Dispatcher) RemoveUsageEventHandler(handler event.UsageEventHandler)
func (*Dispatcher) RemoveUsageEventV3Handler ¶
func (self *Dispatcher) RemoveUsageEventV3Handler(handler event.UsageEventV3Handler)
func (*Dispatcher) WireEventHandlers ¶
func (self *Dispatcher) WireEventHandlers(eventHandlerConfigs []*EventHandlerConfig) error
WireEventHandlers takes the given handler configs and creates handlers and subscriptions for each of them. * Example configuration: events:
jsonLogger: subscriptions: - type: metrics sourceFilter: .* metricFilter: .*xgress.*tx*.m1_rate - type: fabric.circuits include: - created - type: edge.sessions include: - created handler: type: file format: json path: /tmp/ziti-events.log
type EventHandlerConfig ¶
type EventHandlerConfig struct { Id interface{} Config map[interface{}]interface{} }
type FileEventLoggerFactory ¶
type FileEventLoggerFactory struct{}
func (FileEventLoggerFactory) NewEventHandler ¶
func (FileEventLoggerFactory) NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
type FormatterEvent ¶
type JsonCircuitEvent ¶
type JsonCircuitEvent event.CircuitEvent
func (*JsonCircuitEvent) Format ¶
func (event *JsonCircuitEvent) Format() ([]byte, error)
func (*JsonCircuitEvent) GetEventType ¶
func (event *JsonCircuitEvent) GetEventType() string
type JsonClusterEvent ¶
type JsonClusterEvent event.ClusterEvent
func (*JsonClusterEvent) Format ¶
func (event *JsonClusterEvent) Format() ([]byte, error)
func (*JsonClusterEvent) GetEventType ¶
func (event *JsonClusterEvent) GetEventType() string
type JsonEntityChangeEvent ¶
type JsonEntityChangeEvent event.EntityChangeEvent
func (*JsonEntityChangeEvent) Format ¶
func (event *JsonEntityChangeEvent) Format() ([]byte, error)
func (*JsonEntityChangeEvent) GetEventType ¶
func (event *JsonEntityChangeEvent) GetEventType() string
type JsonFormatter ¶
type JsonFormatter struct {
BaseFormatter
}
func NewJsonFormatter ¶
func NewJsonFormatter(queueDepth int, sink event.FormattedEventSink) *JsonFormatter
func (*JsonFormatter) AcceptCircuitEvent ¶
func (formatter *JsonFormatter) AcceptCircuitEvent(evt *event.CircuitEvent)
func (*JsonFormatter) AcceptClusterEvent ¶
func (formatter *JsonFormatter) AcceptClusterEvent(evt *event.ClusterEvent)
func (*JsonFormatter) AcceptEntityChangeEvent ¶
func (formatter *JsonFormatter) AcceptEntityChangeEvent(evt *event.EntityChangeEvent)
func (*JsonFormatter) AcceptLinkEvent ¶
func (formatter *JsonFormatter) AcceptLinkEvent(evt *event.LinkEvent)
func (*JsonFormatter) AcceptMetricsEvent ¶
func (formatter *JsonFormatter) AcceptMetricsEvent(evt *event.MetricsEvent)
func (*JsonFormatter) AcceptRouterEvent ¶
func (formatter *JsonFormatter) AcceptRouterEvent(evt *event.RouterEvent)
func (*JsonFormatter) AcceptServiceEvent ¶
func (formatter *JsonFormatter) AcceptServiceEvent(evt *event.ServiceEvent)
func (*JsonFormatter) AcceptTerminatorEvent ¶
func (formatter *JsonFormatter) AcceptTerminatorEvent(evt *event.TerminatorEvent)
func (*JsonFormatter) AcceptUsageEvent ¶
func (formatter *JsonFormatter) AcceptUsageEvent(evt *event.UsageEvent)
func (*JsonFormatter) AcceptUsageEventV3 ¶
func (formatter *JsonFormatter) AcceptUsageEventV3(evt *event.UsageEventV3)
type JsonLinkEvent ¶
func (*JsonLinkEvent) Format ¶
func (event *JsonLinkEvent) Format() ([]byte, error)
func (*JsonLinkEvent) GetEventType ¶
func (event *JsonLinkEvent) GetEventType() string
type JsonMetricsEvent ¶
type JsonMetricsEvent event.MetricsEvent
func (*JsonMetricsEvent) Format ¶
func (event *JsonMetricsEvent) Format() ([]byte, error)
func (*JsonMetricsEvent) GetEventType ¶
func (event *JsonMetricsEvent) GetEventType() string
type JsonRouterEvent ¶
type JsonRouterEvent event.RouterEvent
func (*JsonRouterEvent) Format ¶
func (event *JsonRouterEvent) Format() ([]byte, error)
func (*JsonRouterEvent) GetEventType ¶
func (event *JsonRouterEvent) GetEventType() string
type JsonServiceEvent ¶
type JsonServiceEvent event.ServiceEvent
func (*JsonServiceEvent) Format ¶
func (event *JsonServiceEvent) Format() ([]byte, error)
func (*JsonServiceEvent) GetEventType ¶
func (event *JsonServiceEvent) GetEventType() string
type JsonTerminatorEvent ¶
type JsonTerminatorEvent event.TerminatorEvent
func (*JsonTerminatorEvent) Format ¶
func (event *JsonTerminatorEvent) Format() ([]byte, error)
func (*JsonTerminatorEvent) GetEventType ¶
func (event *JsonTerminatorEvent) GetEventType() string
type JsonUsageEvent ¶
type JsonUsageEvent event.UsageEvent
func (*JsonUsageEvent) Format ¶
func (event *JsonUsageEvent) Format() ([]byte, error)
func (*JsonUsageEvent) GetEventType ¶
func (event *JsonUsageEvent) GetEventType() string
type JsonUsageEventV3 ¶
type JsonUsageEventV3 event.UsageEventV3
func (*JsonUsageEventV3) Format ¶
func (event *JsonUsageEventV3) Format() ([]byte, error)
func (*JsonUsageEventV3) GetEventType ¶
func (event *JsonUsageEventV3) GetEventType() string
type LoggingHandlerFactory ¶
type LoggingHandlerFactory interface {
NewLoggingHandler(format string, buffer int, out io.WriteCloser) (interface{}, error)
}
type PrometheusMetricsEvent ¶
type PrometheusMetricsEvent event.MetricsEvent
func (*PrometheusMetricsEvent) Marshal ¶
func (event *PrometheusMetricsEvent) Marshal(includeTimestamps bool) ([]byte, error)
func (*PrometheusMetricsEvent) WriteTo ¶
func (event *PrometheusMetricsEvent) WriteTo(output io.WriteCloser, includeTimestamps bool) error
type StdOutLoggerFactory ¶
type StdOutLoggerFactory struct{}
func (StdOutLoggerFactory) NewEventHandler ¶
func (StdOutLoggerFactory) NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
type WriterEventSink ¶
type WriterEventSink struct {
// contains filtered or unexported fields
}
func (WriterEventSink) AcceptFormattedEvent ¶
func (self WriterEventSink) AcceptFormattedEvent(_ string, formattedEvent []byte)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.