resumer

package
v0.0.0-...-2608902 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewResumer = func(tr TransactionResumer) worker.Worker {
	rr := &Resumer{tr: tr}
	go func() {
		defer rr.tomb.Done()
		rr.tomb.Kill(rr.loop())
	}()
	return rr
}

NewResumer periodically resumes pending transactions.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs a resumer worker, using the api connection resource named in the supplied config.

Types

type ManifoldConfig

type ManifoldConfig util.AgentApiManifoldConfig

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type Resumer

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

Resumer is responsible for a periodical resuming of pending transactions.

func (*Resumer) Kill

func (rr *Resumer) Kill()

func (*Resumer) String

func (rr *Resumer) String() string

func (*Resumer) Wait

func (rr *Resumer) Wait() error

type TransactionResumer

type TransactionResumer interface {
	// ResumeTransactions resumes all pending transactions.
	ResumeTransactions() error
}

TransactionResumer defines the interface for types capable to resume transactions.

Jump to

Keyboard shortcuts

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