Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSecretaryFinder ¶
func NewSecretaryFinder(controllerUUID string) lease.SecretaryFinder
NewCabinet returns a SecretaryFinder with default set of secretaries registered with it. Note: a cabinet is a group of secretaries.
Types ¶
type LeadershipSecretary ¶
type LeadershipSecretary struct {
// contains filtered or unexported fields
}
LeadershipSecretary implements Secretary; it checks that leases are application names, and holders are unit names.
func (LeadershipSecretary) CheckDuration ¶
CheckDuration is part of the lease.Secretary interface.
func (LeadershipSecretary) CheckHolder ¶
func (LeadershipSecretary) CheckHolder(name string) error
CheckHolder is part of the lease.Secretary interface.
func (LeadershipSecretary) CheckLease ¶
func (LeadershipSecretary) CheckLease(key lease.Key) error
CheckLease is part of the lease.Secretary interface.
type ObjectStoreSecretary ¶
type ObjectStoreSecretary struct {
// contains filtered or unexported fields
}
ObjectStoreSecretary implements Secretary; it checks that leases are application names, and holders are unit names.
func (ObjectStoreSecretary) CheckDuration ¶
CheckDuration is part of the lease.Secretary interface.
func (ObjectStoreSecretary) CheckHolder ¶
func (ObjectStoreSecretary) CheckHolder(name string) error
CheckHolder is part of the lease.Secretary interface.
func (ObjectStoreSecretary) CheckLease ¶
func (ObjectStoreSecretary) CheckLease(key lease.Key) error
CheckLease is part of the lease.Secretary interface.
type SecretaryFinder ¶
type SecretaryFinder struct {
// contains filtered or unexported fields
}
SecretaryFinder is responsible for returning the correct Secretary for a given namespace.
func (SecretaryFinder) Register ¶
func (c SecretaryFinder) Register(namespace string, secretary lease.Secretary)
Register adds a Secretary to the Cabinet.
func (SecretaryFinder) SecretaryFor ¶
func (c SecretaryFinder) SecretaryFor(namespace string) (lease.Secretary, error)
SecretaryFor returns the Secretary for the given namespace. Returns an error if the namespace is not valid.
type SingularSecretary ¶
type SingularSecretary struct { ControllerUUID string // contains filtered or unexported fields }
SingularSecretary implements Secretary to restrict claims to either a lease for the controller or the specific model it's asking for, holdable only by machine-tag strings.
func (SingularSecretary) CheckDuration ¶
CheckDuration is part of the lease.Secretary interface.
func (SingularSecretary) CheckHolder ¶
func (s SingularSecretary) CheckHolder(name string) error
CheckHolder is part of the lease.Secretary interface.
func (SingularSecretary) CheckLease ¶
func (s SingularSecretary) CheckLease(key lease.Key) error
CheckLease is part of the lease.Secretary interface.