Documentation ¶
Overview ¶
Package crew is a simple, example foundation for gathering a set of machines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Crew ¶
type Crew struct { sync.RWMutex // Id is an optional name for this crew. Id string `json:"id"` // Machines is the collection of Machines indexed by id. Machines map[string]*Machine `json:"machines"` }
Crew is a simple collection of Machines.
type Machine ¶
type Machine struct { Id string `json:"id,omitempty"` Specter core.Specter `json:"-" yaml:"-"` State *core.State `json:"state"` // SpecSource_ is here only to facilitate serialization and // deserialization. This field is not used anywhere in this // package. SpecSource *SpecSource `json:"spec,omitempty"` }
Machine is a triple: id, core.Spec, and core.State.
type SpecProvider ¶
SpecProvider can FindSpec given a SpecSource.
type SpecSource ¶
type SpecSource struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` URL string `json:"url,omitempty" yaml:"url,omitempty"` Source string `json:"source,omitempty" yaml:"source,omitempty"` Inline *core.Spec `json:"inline,omitempty" yaml:",omitempty"` }
SpecSource aspires to hold the origin of a specification.
Currently a source for a Spec can either be a name, a URL, or maybe given explicitly as a string in an unspecified syntax.
func NewSpecSource ¶
func NewSpecSource(name string) *SpecSource
NewSpecSource creates a SpecSource with the given name.
func (*SpecSource) Copy ¶
func (s *SpecSource) Copy() *SpecSource
Copy makes a (deep?) copy of the given SpecSource.
Click to show internal directories.
Click to hide internal directories.