auditor

package
v0.0.0-...-1d9613f Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 7 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(inputChan chan message.Message, runPath string) *Auditor

New returns an initialized Auditor

func (*Auditor) GetLastCommittedOffset

func (a *Auditor) GetLastCommittedOffset(identifier string) int64

GetLastCommittedOffset returns the last committed offset for a given identifier, returns 0 if it does not exist.

func (*Auditor) GetLastCommittedTimestamp

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

GetLastCommittedTimestamp returns the last committed offset for a given identifier

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 RegistryEntry

type RegistryEntry struct {
	Timestamp   string
	Offset      int64
	LastUpdated time.Time
}

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

Jump to

Keyboard shortcuts

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