Documentation ¶
Index ¶
- func AddressToIp(addr *pb.Address) net.IP
- func AddressToString(addr *pb.Address) string
- func BytesToIp(b []byte) net.IP
- func CheckAndStartMetricsService()
- func Int32ToIp(ipLong uint32) net.IP
- type Config
- func (c *Config) GetInputTopic() string
- func (c *Config) GetName() string
- func (c *Config) GetOutputTopics() []string
- func (c *Config) SetInput(val string)
- func (c *Config) SetNamespace(val string)
- func (c *Config) SetOutputs(val []string)
- func (c *Config) SetPersistence(val string)
- func (c *Config) SetTenant(val string)
- type EventHandler
- type EventProducer
- type EventSubscriber
- type Handler
- type HasInputTopics
- type HasOutputTopics
- type Interruptible
- type Producer
- type Stoppable
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressToIp ¶
Converts an Address (compiled protobuf object) to an IP address. Return nil if conversion is not possible.
func AddressToString ¶
Converts an Address (compiled protobuf object) to string form.
func CheckAndStartMetricsService ¶
func CheckAndStartMetricsService()
Types ¶
type Config ¶
type Config struct { Broker string Name string Input string Outputs []string Persistence string Tenant string Namespace string }
func (*Config) GetInputTopic ¶ added in v0.4.0
func (*Config) GetOutputTopics ¶ added in v0.4.0
func (*Config) SetNamespace ¶ added in v0.4.0
func (*Config) SetOutputs ¶
func (*Config) SetPersistence ¶ added in v0.4.0
type EventHandler ¶
Users of the EventAnalytic API implement the Handler interface.
type EventProducer ¶
type EventProducer struct {
*Producer
}
Wraps Pulsar communication and cyberprobe event encoding
func NewEventProducer ¶
func NewEventProducer(c HasOutputTopics) (*EventProducer, error)
Initialise the analyitc
type EventSubscriber ¶
type EventSubscriber struct { *Subscriber // contains filtered or unexported fields }
EventAnalytic API wraps Pulsar communication and cyberprobe event decoding
func NewEventSubscriber ¶
func NewEventSubscriber(c HasInputTopics, e EventHandler) (*EventSubscriber, error)
Initialise the analyitc
type HasInputTopics ¶ added in v0.4.0
type HasOutputTopics ¶ added in v0.4.0
type Interruptible ¶
type Interruptible struct { Context context.Context Cancel context.CancelFunc // contains filtered or unexported fields }
func (*Interruptible) RegisterStop ¶
func (i *Interruptible) RegisterStop(stop Stoppable)
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
Describes Users of the Analytic API implement the Handler interface.
func (*Producer) Output ¶
func (a *Producer) Output(msg *pulsar.ProducerMessage)
Output a message by iterating over all outputs. Retries until message is sent.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Describes Users of the Analytic API implement the Handler interface.
func NewSubscriber ¶
func NewSubscriber(c HasInputTopics, h Handler) (*Subscriber, error)
Initialise the Analytic.
func (*Subscriber) Close ¶
func (s *Subscriber) Close()
func (*Subscriber) Run ¶
func (s *Subscriber) Run()
Go into the 'run' state getting messages from the consumer and delivering to Handler.
func (*Subscriber) Stop ¶
func (s *Subscriber) Stop()