events

package
v0.19.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractId added in v0.16.10

func ExtractId(name string, prefix string, suffixLen int) (string, string)

func NewFileEventLogger added in v0.14.9

func NewFileEventLogger(formatterFactory LoggingHandlerFactory, stdout bool, config map[interface{}]interface{}) (interface{}, error)

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 Dispatcher added in v0.19.28

type Dispatcher struct {
	// contains filtered or unexported fields
}

func NewDispatcher added in v0.19.28

func NewDispatcher(closeNotify <-chan struct{}) *Dispatcher

func (*Dispatcher) AcceptCircuitEvent added in v0.19.28

func (self *Dispatcher) AcceptCircuitEvent(event *event.CircuitEvent)

func (*Dispatcher) AcceptLinkEvent added in v0.19.28

func (self *Dispatcher) AcceptLinkEvent(event *event.LinkEvent)

func (*Dispatcher) AcceptMetricsEvent added in v0.19.28

func (self *Dispatcher) AcceptMetricsEvent(event *event.MetricsEvent)

func (*Dispatcher) AcceptMetricsMsg added in v0.19.28

func (self *Dispatcher) AcceptMetricsMsg(msg *metrics_pb.MetricsMessage)

func (*Dispatcher) AcceptRouterEvent added in v0.19.28

func (self *Dispatcher) AcceptRouterEvent(event *event.RouterEvent)

func (*Dispatcher) AcceptServiceEvent added in v0.19.28

func (self *Dispatcher) AcceptServiceEvent(event *event.ServiceEvent)

func (*Dispatcher) AcceptTerminatorEvent added in v0.19.28

func (self *Dispatcher) AcceptTerminatorEvent(event *event.TerminatorEvent)

func (*Dispatcher) AcceptUsageEvent added in v0.19.28

func (self *Dispatcher) AcceptUsageEvent(event *event.UsageEvent)

func (*Dispatcher) AddCircuitEventHandler added in v0.19.28

func (self *Dispatcher) AddCircuitEventHandler(handler event.CircuitEventHandler)

func (*Dispatcher) AddLinkEventHandler added in v0.19.28

func (self *Dispatcher) AddLinkEventHandler(handler event.LinkEventHandler)

func (*Dispatcher) AddMetricsEventHandler added in v0.19.28

func (self *Dispatcher) AddMetricsEventHandler(handler event.MetricsEventHandler)

func (*Dispatcher) AddMetricsMapper added in v0.19.28

func (self *Dispatcher) AddMetricsMapper(mapper event.MetricsMapper)

func (*Dispatcher) AddMetricsMessageHandler added in v0.19.28

func (self *Dispatcher) AddMetricsMessageHandler(handler event.MetricsMessageHandler)

func (*Dispatcher) AddRouterEventHandler added in v0.19.28

func (self *Dispatcher) AddRouterEventHandler(handler event.RouterEventHandler)

func (*Dispatcher) AddServiceEventHandler added in v0.19.28

func (self *Dispatcher) AddServiceEventHandler(handler event.ServiceEventHandler)

func (*Dispatcher) AddTerminatorEventHandler added in v0.19.28

func (self *Dispatcher) AddTerminatorEventHandler(handler event.TerminatorEventHandler)

func (*Dispatcher) AddUsageEventHandler added in v0.19.28

func (self *Dispatcher) AddUsageEventHandler(handler event.UsageEventHandler)

func (*Dispatcher) Dispatch added in v0.19.28

func (self *Dispatcher) Dispatch(event event.Event)

func (*Dispatcher) InitializeNetworkEvents added in v0.19.28

func (self *Dispatcher) InitializeNetworkEvents(n *network.Network)

func (*Dispatcher) NewFilteredMetricsAdapter added in v0.19.28

func (self *Dispatcher) NewFilteredMetricsAdapter(sourceFilter *regexp.Regexp, metricFilter *regexp.Regexp, handler event.MetricsEventHandler) event.MetricsMessageHandler

func (*Dispatcher) RegisterEventHandlerFactory added in v0.19.28

func (self *Dispatcher) RegisterEventHandlerFactory(eventHandlerType string, factory event.HandlerFactory)

func (*Dispatcher) RegisterEventType added in v0.19.28

func (self *Dispatcher) RegisterEventType(eventType string, registrationHandler event.RegistrationHandler)

func (*Dispatcher) RemoveCircuitEventHandler added in v0.19.28

func (self *Dispatcher) RemoveCircuitEventHandler(handler event.CircuitEventHandler)

func (*Dispatcher) RemoveLinkEventHandler added in v0.19.28

func (self *Dispatcher) RemoveLinkEventHandler(handler event.LinkEventHandler)

func (*Dispatcher) RemoveMetricsEventHandler added in v0.19.28

func (self *Dispatcher) RemoveMetricsEventHandler(handler event.MetricsEventHandler)

func (*Dispatcher) RemoveMetricsMessageHandler added in v0.19.28

func (self *Dispatcher) RemoveMetricsMessageHandler(handler event.MetricsMessageHandler)

func (*Dispatcher) RemoveRouterEventHandler added in v0.19.28

func (self *Dispatcher) RemoveRouterEventHandler(handler event.RouterEventHandler)

func (*Dispatcher) RemoveServiceEventHandler added in v0.19.28

func (self *Dispatcher) RemoveServiceEventHandler(handler event.ServiceEventHandler)

func (*Dispatcher) RemoveTerminatorEventHandler added in v0.19.28

func (self *Dispatcher) RemoveTerminatorEventHandler(handler event.TerminatorEventHandler)

func (*Dispatcher) RemoveUsageEventHandler added in v0.19.28

func (self *Dispatcher) RemoveUsageEventHandler(handler event.UsageEventHandler)

func (*Dispatcher) WireEventHandlers added in v0.19.28

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 added in v0.19.28

type EventHandlerConfig struct {
	Id     interface{}
	Config map[interface{}]interface{}
}

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 JsonCircuitEvent added in v0.19.28

type JsonCircuitEvent event.CircuitEvent

func (*JsonCircuitEvent) WriteTo added in v0.19.28

func (event *JsonCircuitEvent) WriteTo(output io.Writer) 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.Writer) *JsonFormatter

func (*JsonFormatter) AcceptCircuitEvent added in v0.16.92

func (formatter *JsonFormatter) AcceptCircuitEvent(evt *event.CircuitEvent)

func (*JsonFormatter) AcceptLinkEvent added in v0.19.28

func (formatter *JsonFormatter) AcceptLinkEvent(evt *event.LinkEvent)

func (*JsonFormatter) AcceptMetricsEvent added in v0.14.9

func (formatter *JsonFormatter) AcceptMetricsEvent(evt *event.MetricsEvent)

func (*JsonFormatter) AcceptRouterEvent added in v0.16.56

func (formatter *JsonFormatter) AcceptRouterEvent(evt *event.RouterEvent)

func (*JsonFormatter) AcceptServiceEvent added in v0.16.23

func (formatter *JsonFormatter) AcceptServiceEvent(evt *event.ServiceEvent)

func (*JsonFormatter) AcceptTerminatorEvent added in v0.15.6

func (formatter *JsonFormatter) AcceptTerminatorEvent(evt *event.TerminatorEvent)

func (*JsonFormatter) AcceptUsageEvent added in v0.14.9

func (formatter *JsonFormatter) AcceptUsageEvent(evt *event.UsageEvent)

type JsonLinkEvent added in v0.19.28

type JsonLinkEvent event.LinkEvent

func (*JsonLinkEvent) WriteTo added in v0.19.28

func (event *JsonLinkEvent) WriteTo(output io.Writer) error

type JsonMetricsEvent added in v0.14.9

type JsonMetricsEvent event.MetricsEvent

func (*JsonMetricsEvent) WriteTo added in v0.14.9

func (event *JsonMetricsEvent) WriteTo(output io.Writer) error

type JsonRouterEvent added in v0.16.56

type JsonRouterEvent event.RouterEvent

func (*JsonRouterEvent) WriteTo added in v0.16.56

func (event *JsonRouterEvent) WriteTo(output io.Writer) error

type JsonServiceEvent added in v0.16.23

type JsonServiceEvent event.ServiceEvent

func (*JsonServiceEvent) WriteTo added in v0.16.23

func (event *JsonServiceEvent) WriteTo(output io.Writer) error

type JsonTerminatorEvent added in v0.15.6

type JsonTerminatorEvent event.TerminatorEvent

func (*JsonTerminatorEvent) WriteTo added in v0.15.6

func (event *JsonTerminatorEvent) WriteTo(output io.Writer) error

type JsonUsageEvent added in v0.14.9

type JsonUsageEvent event.UsageEvent

func (*JsonUsageEvent) WriteTo added in v0.14.9

func (event *JsonUsageEvent) WriteTo(output io.Writer) error

type LoggingEvent added in v0.14.9

type LoggingEvent interface {
	WriteTo(output io.Writer) error
}

type LoggingHandlerFactory added in v0.14.9

type LoggingHandlerFactory interface {
	NewLoggingHandler(format string, buffer int, out io.WriteCloser) (interface{}, error)
}

type PlainTextCircuitEvent added in v0.19.28

type PlainTextCircuitEvent event.CircuitEvent

func (*PlainTextCircuitEvent) WriteTo added in v0.19.28

func (self *PlainTextCircuitEvent) WriteTo(output io.Writer) 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.Writer) *PlainTextFormatter

func (*PlainTextFormatter) AcceptCircuitEvent added in v0.19.28

func (formatter *PlainTextFormatter) AcceptCircuitEvent(evt *event.CircuitEvent)

func (*PlainTextFormatter) AcceptLinkEvent added in v0.19.28

func (formatter *PlainTextFormatter) AcceptLinkEvent(evt *event.LinkEvent)

func (*PlainTextFormatter) AcceptMetricsEvent added in v0.14.9

func (formatter *PlainTextFormatter) AcceptMetricsEvent(evt *event.MetricsEvent)

func (*PlainTextFormatter) AcceptRouterEvent added in v0.16.56

func (formatter *PlainTextFormatter) AcceptRouterEvent(evt *event.RouterEvent)

func (*PlainTextFormatter) AcceptServiceEvent added in v0.16.23

func (formatter *PlainTextFormatter) AcceptServiceEvent(evt *event.ServiceEvent)

func (*PlainTextFormatter) AcceptTerminatorEvent added in v0.15.6

func (formatter *PlainTextFormatter) AcceptTerminatorEvent(evt *event.TerminatorEvent)

func (*PlainTextFormatter) AcceptUsageEvent added in v0.14.9

func (formatter *PlainTextFormatter) AcceptUsageEvent(evt *event.UsageEvent)

type PlainTextLinkEvent added in v0.19.28

type PlainTextLinkEvent event.LinkEvent

func (*PlainTextLinkEvent) WriteTo added in v0.19.28

func (self *PlainTextLinkEvent) WriteTo(output io.Writer) error

type PlainTextMetricsEvent added in v0.14.9

type PlainTextMetricsEvent event.MetricsEvent

func (*PlainTextMetricsEvent) WriteTo added in v0.14.9

func (event *PlainTextMetricsEvent) WriteTo(output io.Writer) error

type PlainTextRouterEvent added in v0.16.56

type PlainTextRouterEvent event.RouterEvent

func (*PlainTextRouterEvent) WriteTo added in v0.16.56

func (self *PlainTextRouterEvent) WriteTo(output io.Writer) error

type PlainTextServiceEvent added in v0.16.23

type PlainTextServiceEvent event.ServiceEvent

func (*PlainTextServiceEvent) WriteTo added in v0.16.23

func (self *PlainTextServiceEvent) WriteTo(output io.Writer) error

type PlainTextTerminatorEvent added in v0.15.6

type PlainTextTerminatorEvent event.TerminatorEvent

func (*PlainTextTerminatorEvent) WriteTo added in v0.15.6

func (self *PlainTextTerminatorEvent) WriteTo(output io.Writer) error

type PlainTextUsageEvent added in v0.14.9

type PlainTextUsageEvent event.UsageEvent

func (*PlainTextUsageEvent) WriteTo added in v0.14.9

func (self *PlainTextUsageEvent) WriteTo(output io.Writer) error

type PrometheusMetricsEvent added in v0.17.142

type PrometheusMetricsEvent event.MetricsEvent

func (*PrometheusMetricsEvent) Marshal added in v0.17.142

func (event *PrometheusMetricsEvent) Marshal(includeTimestamps bool) ([]byte, error)

func (*PrometheusMetricsEvent) WriteTo added in v0.17.142

func (event *PrometheusMetricsEvent) WriteTo(output io.WriteCloser, includeTimestamps bool) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL