history

package
v0.3.0-prep Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelMethod  = "method"
	LabelSuccess = "success"
)

Variables

This section is empty.

Functions

func NewMock

func NewMock() interface {
	EventReader
	EventWriter
}

Types

type DB

type DB interface {
	LogEvent(flux.InstanceID, flux.Event) error
	AllEvents(flux.InstanceID, time.Time, int64) ([]flux.Event, error)
	EventsForService(flux.InstanceID, flux.ServiceID, time.Time, int64) ([]flux.Event, error)
	GetEvent(flux.EventID) (flux.Event, error)
	io.Closer
}

func InstrumentedDB

func InstrumentedDB(db DB) DB

type EventReadWriter

type EventReadWriter interface {
	EventReader
	EventWriter
}

type EventReader

type EventReader interface {
	// AllEvents returns a history for every service. Events must be
	// returned in descending timestamp order.
	AllEvents(time.Time, int64) ([]flux.Event, error)

	// EventsForService returns the history for a particular
	// service. Events must be returned in descending timestamp order.
	EventsForService(flux.ServiceID, time.Time, int64) ([]flux.Event, error)

	// GetEvent finds a single event, by ID.
	GetEvent(flux.EventID) (flux.Event, error)
}

type EventWriter

type EventWriter interface {
	// LogEvent records a message in the history of a service.
	LogEvent(flux.Event) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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