b01

package
v0.0.0-...-62d810d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Waiting state.
	Waiting = iota

	// Running state.
	Running
)

Variables

View Source
var ErrWrongState = errors.New("Can not take the operation in the current state")

ErrWrongState var.

Functions

This section is empty.

Types

type Agent

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

Agent struct.

func NewAgent

func NewAgent(sizeEvtBuf int) *Agent

NewAgent func.

func (*Agent) Destroy

func (a *Agent) Destroy() error

Destroy func.

func (*Agent) EventProcessGroutine

func (a *Agent) EventProcessGroutine()

EventProcessGroutine func.

func (*Agent) OnEvent

func (a *Agent) OnEvent(evt Event)

OnEvent func.

func (*Agent) RegisterCollector

func (a *Agent) RegisterCollector(name string, collector Collector) error

RegisterCollector func.

func (*Agent) Start

func (a *Agent) Start() error

Start func.

func (*Agent) Stop

func (a *Agent) Stop() error

Stop func.

type CollectionError

type CollectionError struct {
	CollectionErrors []error
}

CollectionError struct.

func (CollectionError) Error

func (ce CollectionError) Error() string

type Collector

type Collector interface {
	Init(evtReceiver EventReceiver) error
	Start(agtCtx context.Context) error
	Stop() error
	Destroy() error
}

Collector interface.

type Event

type Event struct {
	Source  string
	Content string
}

Event struct.

type EventReceiver

type EventReceiver interface {
	OnEvent(evt Event)
}

EventReceiver interface.

Jump to

Keyboard shortcuts

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