allocations

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WatchFile   = "NOMAD_WATCH_FILE"
	UnwatchFile = "NOMAD_UNWATCH_FILE"
)
View Source
const (
	UnwatchHealth = "NOMAD_UNWATCH_ALLOCATION_HEALTH"
	WatchHealth   = "NOMAD_WATCH_ALLOCATION_HEALTH"
)
View Source
const (
	WatchInfo   = "NOMAD_WATCH_ALLOC"
	UnwatchInfo = "NOMAD_UNWATCH_ALLOC"
)
View Source
const (
	UnwatchList        = "NOMAD_UNWATCH_ALLOCS"
	UnwatchListShallow = "NOMAD_UNWATCH_ALLOCS_SHALLOW"
	WatchList          = "NOMAD_WATCH_ALLOCS"
	WatchListShallow   = "NOMAD_WATCH_ALLOCS_SHALLOW"
)
View Source
const (
	WatchStats   = "NOMAD_WATCH_ALLOC_STATS"
	UnwatchStats = "NOMAD_UNWATCH_ALLOC_STATS"
)
View Source
const (
	FetchDir = "NOMAD_FETCH_DIR"
)

Variables

This section is empty.

Functions

func NewDir

func NewDir(action structs.Action, client *api.Client, query *api.QueryOptions) *dir

func NewFile

func NewFile(action structs.Action, client *api.Client) *file

func NewHealth added in v0.20.0

func NewHealth(action structs.Action, nomad *nomad.Client, consul *consul.Client, consulQuery *consul.QueryOptions) *health

func NewInfo

func NewInfo(action structs.Action, client *api.Client, query *api.QueryOptions) *info

func NewList

func NewList(action structs.Action, shallow bool, client *api.Client, query *api.QueryOptions) *list

func NewStats added in v0.20.0

func NewStats(action structs.Action, client *api.Client, query *api.QueryOptions) *stats

Types

type LineLimitReader

type LineLimitReader struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

LineLimitReader wraps another reader and provides `tail -n` like behavior. LineLimitReader buffers up to the searchLimit and returns `-n` number of lines. After those lines have been returned, LineLimitReader streams the underlying ReadCloser

func NewLineLimitReader

func NewLineLimitReader(r io.ReadCloser, lines, searchLimit int, timeLimit time.Duration) *LineLimitReader

NewLineLimitReader takes the ReadCloser to wrap, the number of lines to find searching backwards in the first searchLimit bytes. timeLimit can optionally be specified by passing a non-zero duration. When set, the search for the last n lines is aborted if no data has been read in the duration. This can be used to flush what is had if no extra data is being received. When used, the underlying reader must not block forever and must periodically unblock even when no data has been read.

func (*LineLimitReader) Read

func (l *LineLimitReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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