Documentation
¶
Overview ¶
Package relation provides core types that can be used for interacting with relations.
A relation is a pair of application endpoints. A peer relation is a single application endpoint where all units of an application are related to each other.
RelationUnit holds information about a single unit in a relation.
See the domain/relation for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Status ¶
type Status string
Status describes the status of a relation.
const ( // Joined is the normal status for a healthy, alive relation. Joined Status = "joined" // Broken is the status for when a relation life goes to Dead. Broken Status = "broken" // Suspended is used to signify that a relation is temporarily broken pending // action to resume it. Suspended Status = "suspended" // Error is used to signify that the relation is in an error state. Error Status = "error" )
type UUID ¶
type UUID string
UUID represents a relation unique identifier.
func ParseUUID ¶
ParseUUID returns a new UUID from the given string. If the string is not a valid uuid an error satisfying errors.NotValid will be returned.
func (UUID) Validate ¶
Validate ensures the consistency of the UUID. If the uuid is invalid an error satisfying errors.NotValid will be returned.
type UnitUUID ¶
type UnitUUID string
UnitUUID represents a relation unit unique identifier.
func NewUnitUUID ¶
NewUnitUUID is a convince function for generating a new relation unit uuid.
func ParseUnitUUID ¶
UnitUUID returns a new UUID from the given string. If the string is not a valid uuid an error satisfying errors.NotValid will be returned.
func (UnitUUID) Validate ¶
Validate ensures the consistency of the UUID. If the uuid is invalid an error satisfying errors.NotValid will be returned.