Documentation
¶
Overview ¶
Package tensile is a config management library a la Puppet, Ansible, Chef, etc.pp. written in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cable ¶
type Cable interface {
// Context returns a context that is valid for the lifetime of the [Node].
// That means the Context is valid from the first call to Validation
// and until Execute has finished.
Context() context.Context
// Logger returns a logger for the [Node].
Logger() *slog.Logger
}
Cable provides some base functionality to Node.
type Depender ¶
type Depender interface {
// DependsOn returns a list of resources the node depends on, e.g.
// packages or files.
DependsOn() ([]NodeRef, error)
}
Depender is the interface to be satisfied by a Node when it depends on other resources to be provided by other Node., e.g. a package that must be installed or a file to be ensured.
type Executor ¶
type Executor interface {
// NeedsExecution is run before Execute. NeedsExecution must not
// mane any modifications to the system, it must be a stateless
// check to check if Node.Execute must be called.
//
// NeedsExecution is called e.g. for noop runs to check if any
// changes are needed.
NeedsExecution(cable Cable) (bool, error)
// Execute is called for the node to make the desired change.
Execute(cable Cable) error
}
Executor is the interface to be satisfied by a Node to be executed.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a single step to be executed by an engine.
func (*Node) NeedsExecution ¶
NeedsExecution calls .NeedsExecution on the wrapped node if it implements it.
type NodeRef ¶
NodeRef is a reference to a node.
func (NodeRef) String ¶
String implements the fmt.Stringer interface.
type Provider ¶
type Provider interface {
// Provides returns a list of resources the node will provide, e.g.
// a list of packages or files.
Provides() ([]NodeRef, error)
}
Provider is the interface to be satisfied by a Node when it provides resources, e.g. installing a package or creating a file.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
tester
command
A quick command to test things.
|
A quick command to test things. |
|
pkg
|
|
|
cable
Package cable contains implementations for tensile.Cable and utility functions around it.
|
Package cable contains implementations for tensile.Cable and utility functions around it. |
|
engine
Package engine contains execution engines for tensile.
|
Package engine contains execution engines for tensile. |
|
queue
Package queue implements the ordering logic to execute tensile.Node.
|
Package queue implements the ordering logic to execute tensile.Node. |
|
Package tensilestd contains tensile.Node implementations.
|
Package tensilestd contains tensile.Node implementations. |