Help us shape the future of Go! Take the 2026 Go Developer Survey

queue

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	ID() ids.ID

	MissingDependencies() (ids.Set, error)
	Execute() error

	Bytes() []byte
}

Job ...

type Jobs

type Jobs struct {
	// contains filtered or unexported fields
}

Jobs ...

func New

func New(db database.Database) (*Jobs, error)

New ...

func (*Jobs) Commit

func (j *Jobs) Commit() error

Commit ...

func (*Jobs) Execute

func (j *Jobs) Execute(job Job) error

Execute ...

func (*Jobs) HasNext

func (j *Jobs) HasNext() (bool, error)

HasNext ...

func (*Jobs) Pop

func (j *Jobs) Pop() (Job, error)

Pop ...

func (*Jobs) Push

func (j *Jobs) Push(job Job) error

Push ...

func (*Jobs) SetParser

func (j *Jobs) SetParser(parser Parser)

SetParser ...

type Parser

type Parser interface {
	Parse([]byte) (Job, error)
}

Parser ...

type TestJob

type TestJob struct {
	T *testing.T

	CantID,
	CantMissingDependencies,
	CantExecute,
	CantBytes bool

	IDF                  func() ids.ID
	MissingDependenciesF func() (ids.Set, error)
	ExecuteF             func() error
	BytesF               func() []byte
}

TestJob is a test Job

func (*TestJob) Bytes

func (j *TestJob) Bytes() []byte

Bytes ...

func (*TestJob) Default

func (j *TestJob) Default(cant bool)

Default ...

func (*TestJob) Execute

func (j *TestJob) Execute() error

Execute ...

func (*TestJob) ID

func (j *TestJob) ID() ids.ID

ID ...

func (*TestJob) MissingDependencies

func (j *TestJob) MissingDependencies() (ids.Set, error)

MissingDependencies ...

type TestParser

type TestParser struct {
	T *testing.T

	CantParse bool

	ParseF func([]byte) (Job, error)
}

TestParser is a test Parser

func (*TestParser) Default

func (p *TestParser) Default(cant bool)

Default ...

func (*TestParser) Parse

func (p *TestParser) Parse(b []byte) (Job, error)

Parse ...

Jump to

Keyboard shortcuts

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