Documentation
¶
Overview ¶
Package pins provides a simple set of operations for tracking pinned references.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTraversal = errors.New("traverser iteration failed")
ErrTraversal signals that errors occurred during nodes traverser.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // CreatePin creates a new pins for the given reference. // The boolean arguments specifies whether all nodes // in the tree should also be traversed and pinned. // Repeating calls of this method are idempotent. CreatePin(context.Context, cluster.Address, bool) error // DeletePin deletes given reference. All the existing // nodes in the tree will also be traversed and un-pinned. // Repeating calls of this method are idempotent. DeletePin(context.Context, cluster.Address) error // HasPin returns true if the given reference has root pins. HasPin(cluster.Address) (bool, error) // Pins return all pinned references. Pins() ([]cluster.Address, error) }
Interface defines pins operations.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is implementation of the pins.Interface.
func NewService ¶
func NewService( pinStorage storage.Storer, rhStorage storage.StateStorer, traverser traverser.Traverser, ) *Service
NewService is a convenient constructor for Service.
Click to show internal directories.
Click to hide internal directories.