auditor

package
v0.0.0-...-3dd6856 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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) 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
}

Registry holds a list of offsets.

type RegistryEntry

type RegistryEntry struct {
	LastUpdated time.Time
	Offset      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