Documentation ¶
Index ¶
- Constants
- func AddMetricsNameMapper(mapper MetricsNameMapper)
- func AddRouterEventHandler(handler RouterEventHandler)
- func AddServiceEventHandler(handler ServiceEventHandler)
- func AddSessionEventHandler(handler network.SessionEventHandler)
- func AddTerminatorEventHandler(handler TerminatorEventHandler)
- func AddTraceEventHandler(handler trace.EventHandler)
- func ExtractId(name string, prefix string, suffixLen int) (string, string, bool)
- func InitRouterEventRouter(n *network.Network)
- func InitTerminatorEventRouter(n *network.Network)
- func NewFileEventLogger(formatterFactory LoggingHandlerFactory, stdout bool, ...) (interface{}, error)
- func RegisterEventHandler(id interface{}, config map[interface{}]interface{})
- func RegisterEventHandlerType(eventHandlerType string, factory EventHandlerFactory)
- func RegisterEventType(eventType string, registrationHandler registrationHandler)
- func RegisterSessionEventHandler(handler SessionEventHandler) func()
- func RegisterUsageEventHandler(handler UsageEventHandler) func()
- func RemoveRouterEventHandler(handler RouterEventHandler)
- func RemoveServiceEventHandler(handler ServiceEventHandler)
- func RemoveSessionEventHandler(handler network.SessionEventHandler)
- func RemoveTerminatorEventHandler(handler TerminatorEventHandler)
- func RemoveTraceEventHandler(handler trace.EventHandler)
- func WireEventHandlers(serviceEventInitializer func(handler metrics.Handler)) error
- type BaseFormatter
- type EventHandlerFactory
- type FileEventLoggerFactory
- type JsonFabricSessionEvent
- type JsonFormatter
- func (formatter *JsonFormatter) AcceptMetricsEvent(event *MetricsEvent)
- func (formatter *JsonFormatter) AcceptRouterEvent(event *RouterEvent)
- func (formatter *JsonFormatter) AcceptServiceEvent(event *ServiceEvent)
- func (formatter *JsonFormatter) AcceptSessionEvent(event *SessionEvent)
- func (formatter *JsonFormatter) AcceptTerminatorEvent(event *TerminatorEvent)
- func (formatter *JsonFormatter) AcceptUsageEvent(event *UsageEvent)
- type JsonMetricsEvent
- type JsonRouterEvent
- type JsonServiceEvent
- type JsonTerminatorEvent
- type JsonUsageEvent
- type LoggingEvent
- type LoggingHandlerFactory
- type MetricsEvent
- type MetricsEventHandler
- type MetricsNameMapper
- type PlainTextFabricSessionEvent
- type PlainTextFormatter
- func (formatter *PlainTextFormatter) AcceptMetricsEvent(event *MetricsEvent)
- func (formatter *PlainTextFormatter) AcceptRouterEvent(event *RouterEvent)
- func (formatter *PlainTextFormatter) AcceptServiceEvent(event *ServiceEvent)
- func (formatter *PlainTextFormatter) AcceptSessionEvent(event *SessionEvent)
- func (formatter *PlainTextFormatter) AcceptTerminatorEvent(event *TerminatorEvent)
- func (formatter *PlainTextFormatter) AcceptUsageEvent(event *UsageEvent)
- type PlainTextMetricsEvent
- type PlainTextRouterEvent
- type PlainTextServiceEvent
- type PlainTextTerminatorEvent
- type PlainTextUsageEvent
- type RouterEvent
- type RouterEventHandler
- type ServiceEvent
- type ServiceEventHandler
- type SessionEvent
- type SessionEventHandler
- type StdOutLoggerFactory
- type TerminatorEvent
- type TerminatorEventHandler
- type UsageEvent
- type UsageEventHandler
Constants ¶
View Source
const SessionEventTypeCircuitUpdated = "circuitUpdated"
View Source
const SessionEventTypeCreated = "created"
View Source
const SessionEventTypeDeleted = "deleted"
Variables ¶
This section is empty.
Functions ¶
func AddMetricsNameMapper ¶ added in v0.16.10
func AddMetricsNameMapper(mapper MetricsNameMapper)
func AddRouterEventHandler ¶ added in v0.16.56
func AddRouterEventHandler(handler RouterEventHandler)
func AddServiceEventHandler ¶ added in v0.16.23
func AddServiceEventHandler(handler ServiceEventHandler)
func AddSessionEventHandler ¶
func AddSessionEventHandler(handler network.SessionEventHandler)
func AddTerminatorEventHandler ¶ added in v0.15.6
func AddTerminatorEventHandler(handler TerminatorEventHandler)
func AddTraceEventHandler ¶
func AddTraceEventHandler(handler trace.EventHandler)
func InitRouterEventRouter ¶ added in v0.16.56
func InitTerminatorEventRouter ¶ added in v0.15.6
func NewFileEventLogger ¶ added in v0.14.9
func NewFileEventLogger(formatterFactory LoggingHandlerFactory, stdout bool, config map[interface{}]interface{}) (interface{}, error)
func RegisterEventHandler ¶ added in v0.14.9
func RegisterEventHandler(id interface{}, config map[interface{}]interface{})
func RegisterEventHandlerType ¶ added in v0.14.9
func RegisterEventHandlerType(eventHandlerType string, factory EventHandlerFactory)
func RegisterEventType ¶ added in v0.14.9
func RegisterEventType(eventType string, registrationHandler registrationHandler)
func RegisterSessionEventHandler ¶ added in v0.16.12
func RegisterSessionEventHandler(handler SessionEventHandler) func()
func RegisterUsageEventHandler ¶ added in v0.16.12
func RegisterUsageEventHandler(handler UsageEventHandler) func()
func RemoveRouterEventHandler ¶ added in v0.16.56
func RemoveRouterEventHandler(handler RouterEventHandler)
func RemoveServiceEventHandler ¶ added in v0.16.23
func RemoveServiceEventHandler(handler ServiceEventHandler)
func RemoveSessionEventHandler ¶
func RemoveSessionEventHandler(handler network.SessionEventHandler)
func RemoveTerminatorEventHandler ¶ added in v0.15.6
func RemoveTerminatorEventHandler(handler TerminatorEventHandler)
func RemoveTraceEventHandler ¶
func RemoveTraceEventHandler(handler trace.EventHandler)
func WireEventHandlers ¶ added in v0.14.9
* Example configuration: events:
jsonLogger: subscriptions: - type: metrics sourceFilter: .* metricFilter: .*xgress.*tx*.m1_rate - type: fabric.sessions include: - created - type: edge.sessions include: - created handler: type: file format: json path: /tmp/ziti-events.log
Types ¶
type BaseFormatter ¶ added in v0.14.9
type BaseFormatter struct {
// contains filtered or unexported fields
}
func (*BaseFormatter) AcceptLoggingEvent ¶ added in v0.14.9
func (f *BaseFormatter) AcceptLoggingEvent(event LoggingEvent)
func (*BaseFormatter) Run ¶ added in v0.14.9
func (f *BaseFormatter) Run()
type EventHandlerFactory ¶ added in v0.14.9
type EventHandlerFactory interface {
NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
}
type FileEventLoggerFactory ¶ added in v0.14.9
type FileEventLoggerFactory struct{}
func (FileEventLoggerFactory) NewEventHandler ¶ added in v0.14.9
func (FileEventLoggerFactory) NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
type JsonFabricSessionEvent ¶ added in v0.14.9
type JsonFabricSessionEvent SessionEvent
func (*JsonFabricSessionEvent) WriteTo ¶ added in v0.14.9
func (event *JsonFabricSessionEvent) WriteTo(output io.WriteCloser) error
type JsonFormatter ¶ added in v0.14.9
type JsonFormatter struct {
BaseFormatter
}
func NewJsonFormatter ¶ added in v0.14.9
func NewJsonFormatter(queueDepth int, output io.WriteCloser) *JsonFormatter
func (*JsonFormatter) AcceptMetricsEvent ¶ added in v0.14.9
func (formatter *JsonFormatter) AcceptMetricsEvent(event *MetricsEvent)
func (*JsonFormatter) AcceptRouterEvent ¶ added in v0.16.56
func (formatter *JsonFormatter) AcceptRouterEvent(event *RouterEvent)
func (*JsonFormatter) AcceptServiceEvent ¶ added in v0.16.23
func (formatter *JsonFormatter) AcceptServiceEvent(event *ServiceEvent)
func (*JsonFormatter) AcceptSessionEvent ¶ added in v0.14.9
func (formatter *JsonFormatter) AcceptSessionEvent(event *SessionEvent)
func (*JsonFormatter) AcceptTerminatorEvent ¶ added in v0.15.6
func (formatter *JsonFormatter) AcceptTerminatorEvent(event *TerminatorEvent)
func (*JsonFormatter) AcceptUsageEvent ¶ added in v0.14.9
func (formatter *JsonFormatter) AcceptUsageEvent(event *UsageEvent)
type JsonMetricsEvent ¶ added in v0.14.9
type JsonMetricsEvent MetricsEvent
func (*JsonMetricsEvent) WriteTo ¶ added in v0.14.9
func (event *JsonMetricsEvent) WriteTo(output io.WriteCloser) error
type JsonRouterEvent ¶ added in v0.16.56
type JsonRouterEvent RouterEvent
func (*JsonRouterEvent) WriteTo ¶ added in v0.16.56
func (event *JsonRouterEvent) WriteTo(output io.WriteCloser) error
type JsonServiceEvent ¶ added in v0.16.23
type JsonServiceEvent ServiceEvent
func (*JsonServiceEvent) WriteTo ¶ added in v0.16.23
func (event *JsonServiceEvent) WriteTo(output io.WriteCloser) error
type JsonTerminatorEvent ¶ added in v0.15.6
type JsonTerminatorEvent TerminatorEvent
func (*JsonTerminatorEvent) WriteTo ¶ added in v0.15.6
func (event *JsonTerminatorEvent) WriteTo(output io.WriteCloser) error
type JsonUsageEvent ¶ added in v0.14.9
type JsonUsageEvent UsageEvent
func (*JsonUsageEvent) WriteTo ¶ added in v0.14.9
func (event *JsonUsageEvent) WriteTo(output io.WriteCloser) error
type LoggingEvent ¶ added in v0.14.9
type LoggingEvent interface {
WriteTo(output io.WriteCloser) error
}
type LoggingHandlerFactory ¶ added in v0.14.9
type LoggingHandlerFactory interface {
NewLoggingHandler(format string, buffer int, out io.WriteCloser) (interface{}, error)
}
type MetricsEvent ¶ added in v0.14.9
type MetricsEventHandler ¶ added in v0.14.9
type MetricsEventHandler interface {
AcceptMetricsEvent(event *MetricsEvent)
}
type MetricsNameMapper ¶ added in v0.16.10
type PlainTextFabricSessionEvent ¶ added in v0.14.9
type PlainTextFabricSessionEvent SessionEvent
func (*PlainTextFabricSessionEvent) WriteTo ¶ added in v0.14.9
func (event *PlainTextFabricSessionEvent) WriteTo(output io.WriteCloser) error
type PlainTextFormatter ¶ added in v0.14.9
type PlainTextFormatter struct {
BaseFormatter
}
func NewPlainTextFormatter ¶ added in v0.14.9
func NewPlainTextFormatter(queueDepth int, output io.WriteCloser) *PlainTextFormatter
func (*PlainTextFormatter) AcceptMetricsEvent ¶ added in v0.14.9
func (formatter *PlainTextFormatter) AcceptMetricsEvent(event *MetricsEvent)
func (*PlainTextFormatter) AcceptRouterEvent ¶ added in v0.16.56
func (formatter *PlainTextFormatter) AcceptRouterEvent(event *RouterEvent)
func (*PlainTextFormatter) AcceptServiceEvent ¶ added in v0.16.23
func (formatter *PlainTextFormatter) AcceptServiceEvent(event *ServiceEvent)
func (*PlainTextFormatter) AcceptSessionEvent ¶ added in v0.14.9
func (formatter *PlainTextFormatter) AcceptSessionEvent(event *SessionEvent)
func (*PlainTextFormatter) AcceptTerminatorEvent ¶ added in v0.15.6
func (formatter *PlainTextFormatter) AcceptTerminatorEvent(event *TerminatorEvent)
func (*PlainTextFormatter) AcceptUsageEvent ¶ added in v0.14.9
func (formatter *PlainTextFormatter) AcceptUsageEvent(event *UsageEvent)
type PlainTextMetricsEvent ¶ added in v0.14.9
type PlainTextMetricsEvent MetricsEvent
func (*PlainTextMetricsEvent) WriteTo ¶ added in v0.14.9
func (event *PlainTextMetricsEvent) WriteTo(output io.WriteCloser) error
type PlainTextRouterEvent ¶ added in v0.16.56
type PlainTextRouterEvent RouterEvent
func (*PlainTextRouterEvent) WriteTo ¶ added in v0.16.56
func (event *PlainTextRouterEvent) WriteTo(output io.WriteCloser) error
type PlainTextServiceEvent ¶ added in v0.16.23
type PlainTextServiceEvent ServiceEvent
func (*PlainTextServiceEvent) WriteTo ¶ added in v0.16.23
func (event *PlainTextServiceEvent) WriteTo(output io.WriteCloser) error
type PlainTextTerminatorEvent ¶ added in v0.15.6
type PlainTextTerminatorEvent TerminatorEvent
func (*PlainTextTerminatorEvent) WriteTo ¶ added in v0.15.6
func (event *PlainTextTerminatorEvent) WriteTo(output io.WriteCloser) error
type PlainTextUsageEvent ¶ added in v0.14.9
type PlainTextUsageEvent UsageEvent
func (*PlainTextUsageEvent) WriteTo ¶ added in v0.14.9
func (event *PlainTextUsageEvent) WriteTo(output io.WriteCloser) error
type RouterEvent ¶ added in v0.16.56
type RouterEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` Timestamp time.Time `json:"timestamp"` RouterId string `json:"router_id"` RouterOnline bool `json:"router_online"` }
func (*RouterEvent) String ¶ added in v0.16.56
func (event *RouterEvent) String() string
type RouterEventHandler ¶ added in v0.16.56
type RouterEventHandler interface {
AcceptRouterEvent(event *RouterEvent)
}
type ServiceEvent ¶ added in v0.16.23
type ServiceEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` ServiceId string `json:"service_id"` Count uint64 `json:"count"` IntervalStartUTC int64 `json:"interval_start_utc"` IntervalLength uint64 `json:"interval_length"` }
func (*ServiceEvent) String ¶ added in v0.16.23
func (event *ServiceEvent) String() string
type ServiceEventHandler ¶ added in v0.16.23
type ServiceEventHandler interface {
AcceptServiceEvent(event *ServiceEvent)
}
type SessionEvent ¶ added in v0.14.9
type SessionEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` SessionId string `json:"session_id"` Timestamp time.Time `json:"timestamp"` ClientId string `json:"client_id"` ServiceId string `json:"service_id"` Circuit string `json:"circuit"` }
Will work for all fabric session event types
func (*SessionEvent) String ¶ added in v0.14.9
func (event *SessionEvent) String() string
type SessionEventHandler ¶ added in v0.14.9
type SessionEventHandler interface {
AcceptSessionEvent(event *SessionEvent)
}
type StdOutLoggerFactory ¶ added in v0.14.9
type StdOutLoggerFactory struct{}
func (StdOutLoggerFactory) NewEventHandler ¶ added in v0.14.9
func (StdOutLoggerFactory) NewEventHandler(config map[interface{}]interface{}) (interface{}, error)
type TerminatorEvent ¶ added in v0.15.6
type TerminatorEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` Timestamp time.Time `json:"timestamp"` ServiceId string `json:"service_id"` TerminatorId string `json:"terminator_id"` RouterId string `json:"router_id"` RouterOnline bool `json:"router_online"` Precedence string `json:"precedence"` StaticCost uint16 `json:"static_cost"` DynamicCost uint16 `json:"dynamic_cost"` TotalTerminators int `json:"total_terminators"` UsableDefaultTerminators int `json:"usable_default_terminators"` UsableRequiredTerminators int `json:"usable_required_terminators"` }
func (*TerminatorEvent) String ¶ added in v0.15.6
func (event *TerminatorEvent) String() string
type TerminatorEventHandler ¶ added in v0.15.6
type TerminatorEventHandler interface {
AcceptTerminatorEvent(event *TerminatorEvent)
}
type UsageEvent ¶ added in v0.14.9
type UsageEvent struct { Namespace string `json:"namespace"` EventType string `json:"event_type"` SourceId string `json:"source_id"` SessionId string `json:"session_id"` Usage uint64 `json:"usage"` IntervalStartUTC int64 `json:"interval_start_utc"` IntervalLength uint64 `json:"interval_length"` }
func (*UsageEvent) String ¶ added in v0.14.9
func (event *UsageEvent) String() string
type UsageEventHandler ¶ added in v0.14.9
type UsageEventHandler interface {
AcceptUsageEvent(event *UsageEvent)
}
Click to show internal directories.
Click to hide internal directories.