spring

package
v0.0.0-...-fe43aa5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCircularDependency = errors.New("circulare dependency detected")

ErrCircularDependency is returned when a circular dependency is created

View Source
var ErrDoesNotExist = errors.New("spring by that name does not exist")

ErrDoesNotExist is returned when you try to get a spring from the assessembly and it does not exist

View Source
var ErrDuplicateName = errors.New("name already exists in the assessembly")

ErrDuplicateName is returned when the name is already in the assessembly

Functions

This section is empty.

Types

type Assessembly

type Assessembly interface {
	Add(Spring) Spring
	Get(string) (Spring, error)
	Names() []string
	Clear() Assessembly
	Order(Spring) (Springs, error)
}

Assessembly interface describes how springs should be assessed from storage

func NewAssessembly

func NewAssessembly() Assessembly

NewAssessembly creates an Assessembly from the default impliementation

type Spring

type Spring interface {
	cogger.Cog
	graph.Node
	Name() string
	DependsOn() []string
}

Spring implements a basic cog interface, the ability to get a name and

func New

func New(name string, cog cogger.Cog, dependsOn ...string) Spring

New creates a spring from a name, cog and dependency names and default implementation

type Springs

type Springs []Spring

Springs is an array of Springs

func (Springs) ToCogs

func (sprngs Springs) ToCogs() []cogger.Cog

ToCogs converts Springs to an array of cogs

Jump to

Keyboard shortcuts

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