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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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