auditor

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auditor

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

An Auditor handles messages successfully submitted to the intake

func New

func New(runPath string, health *health.Handle) *Auditor

New returns an initialized Auditor

func (*Auditor) Channel

func (a *Auditor) Channel() chan *message.Message

Channel returns the channel to use to communicate with the auditor or nil if the auditor is currently stopped.

func (*Auditor) GetOffset

func (a *Auditor) GetOffset(identifier string) string

GetOffset returns the last committed offset for a given identifier, returns an empty string if it does not exist.

func (*Auditor) GetTailingMode

func (a *Auditor) GetTailingMode(identifier string) string

GetTailingMode returns the last committed offset for a given identifier, returns an empty string if it does not exist.

func (*Auditor) Start

func (a *Auditor) Start()

Start starts the Auditor

func (*Auditor) Stop

func (a *Auditor) Stop()

Stop stops the Auditor

type JSONRegistry

type JSONRegistry struct {
	Version  int
	Registry map[string]RegistryEntry
}

JSONRegistry represents the registry that will be written on disk

type Registry

type Registry interface {
	GetOffset(identifier string) string
	GetTailingMode(identifier string) string
}

Registry holds a list of offsets.

type RegistryEntry

type RegistryEntry struct {
	LastUpdated time.Time
	Offset      string
	TailingMode string
}

A RegistryEntry represents an entry in the registry where we keep track of current offsets

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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