util

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentApiManifold

func AgentApiManifold(config AgentApiManifoldConfig, start AgentApiStartFunc) dependency.Manifold

AgentApiManifold returns a dependency.Manifold that calls the supplied start func with the API and agent resources defined in the config (once those resources are present).

func AgentManifold

func AgentManifold(config AgentManifoldConfig, start AgentStartFunc) dependency.Manifold

AgentManifold returns a dependency.Manifold that calls the supplied start func with the agent resource defined in the config (once it's present).

func ApiManifold

func ApiManifold(config ApiManifoldConfig, start ApiStartFunc) dependency.Manifold

ApiManifold returns a dependency.Manifold that calls the supplied start func with the API resource defined in the config (once it's present).

func NewValueWorker

func NewValueWorker(value interface{}) (worker.Worker, error)

NewValueWorker returns a degenerate worker that exposes the supplied value when passed into ValueWorkerOutput. Please do not supply values that have their own dependency or lifecycle considerations; such values will subvert the operation of any containing dependency.Engine by insulating it from the failures and dependency changes of the contained value.

func ValueWorkerOutput

func ValueWorkerOutput(in worker.Worker, out interface{}) error

ValueWorkerOutput sets the value wrapped by the supplied valueWorker into the out pointer, if type-compatible, or fails.

Types

type AgentApiManifoldConfig

type AgentApiManifoldConfig struct {
	AgentName     string
	APICallerName string
}

Many manifolds completely depend on an agent and an API connection; this type configures them.

type AgentApiStartFunc

type AgentApiStartFunc func(agent.Agent, base.APICaller) (worker.Worker, error)

AgentApiStartFunc encapsulates the behaviour that varies among AgentApiManifolds.

type AgentManifoldConfig

type AgentManifoldConfig struct {
	AgentName string
}

Some manifolds just depend on an agent; this type configures them.

type AgentStartFunc

type AgentStartFunc func(agent.Agent) (worker.Worker, error)

AgentStartFunc encapsulates the behaviour that varies among AgentManifolds.

type ApiManifoldConfig

type ApiManifoldConfig struct {
	APICallerName string
}

Some (hopefully growing number of) manifolds completely depend on an API connection; this type configures them.

type ApiStartFunc

type ApiStartFunc func(base.APICaller) (worker.Worker, error)

ApiStartFunc encapsulates the behaviour that varies among ApiManifolds.

Jump to

Keyboard shortcuts

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