eventd

package
v5.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT, MIT, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComponentName identifies Eventd as the component/daemon implemented in this
	// package.
	ComponentName = "eventd"

	// DefaultHandlerCount is the number of goroutines that will be allocated
	// for processing incoming events.
	DefaultHandlerCount = 1000

	// EventsProcessedCounterVec is the name of the prometheus counter vec used to count events processed.
	EventsProcessedCounterVec = "sensu_go_events_processed"

	// EventsProcessedLabelName is the name of the label which stores prometheus values.
	EventsProcessedLabelName = "status"

	// EventsProcessedLabelSuccess is the name of the label used to count events processed successfully.
	EventsProcessedLabelSuccess = "success"
)

Variables

View Source
var (

	// EventsProcessed counts the number of sensu go events processed.
	EventsProcessed = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: EventsProcessedCounterVec,
			Help: "The total number of processed events",
		},
		[]string{EventsProcessedLabelName},
	)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Store           store.Store
	EventStore      store.EventStore
	Bus             messaging.MessageBus
	LivenessFactory liveness.Factory
}

Config configures Eventd

type Eventd

type Eventd struct {
	Logger Logger
	// contains filtered or unexported fields
}

Eventd handles incoming sensu events and stores them in etcd.

func New

func New(c Config, opts ...Option) (*Eventd, error)

New creates a new Eventd.

func (*Eventd) Err

func (e *Eventd) Err() <-chan error

Err returns a channel to listen for terminal errors on.

func (*Eventd) Name

func (e *Eventd) Name() string

Name returns the daemon name

func (*Eventd) Receiver

func (e *Eventd) Receiver() chan<- interface{}

Receiver returns the event receiver channel.

func (*Eventd) Start

func (e *Eventd) Start() error

Start eventd.

func (*Eventd) Stop

func (e *Eventd) Stop() error

Stop eventd.

type Logger

type Logger interface {
	Stop()
	Println(v interface{})
}

Logger ...

type Option

type Option func(*Eventd) error

Option is a functional option.

type RawLogger

type RawLogger struct{}

RawLogger ...

func (*RawLogger) Println

func (l *RawLogger) Println(v interface{})

Println ...

func (*RawLogger) Stop

func (l *RawLogger) Stop()

Stop ...

Jump to

Keyboard shortcuts

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