Documentation ¶
Overview ¶
Package charmdir provides the manifold that coordinates the availability of a charm directory among workers. It provides two roles, a Locker who decides whether the charm directory is available, and a Consumer, which operates on an available charm directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAvailable = errors.New("charmdir not available")
ErrNotAvailable indicates that the requested operation cannot be performed on the charm directory because it is not available.
Functions ¶
func Manifold ¶
func Manifold() dependency.Manifold
Manifold returns a dependency.Manifold that coordinates availability of a charm directory.
Types ¶
type Consumer ¶
type Consumer interface { // Run performs the given function if the charm directory is available. It // returns whether the charm directory was available to execute the function, // and any error returned by that function. Run(func() error) error }
Consumer is used by workers that want to perform tasks on the condition that the charm directory is available.
Click to show internal directories.
Click to hide internal directories.