juju: github.com/juju/juju/core/life Index | Files

package life

import "github.com/juju/juju/core/life"

Index

Package Files

life.go

func IsNotAlive Uses

func IsNotAlive(v Value) bool

IsNotAlive is a Predicate that returns true if the supplied value is not Alive.

This generally indicates that the entity in question is at some stage of destruction/cleanup.

func IsNotDead Uses

func IsNotDead(v Value) bool

IsNotDead is a Predicate that returns true if the supplied value is not Dead.

This generally indicates that the entity in question is active in some way, and can probably not be completely destroyed without consequences.

type Predicate Uses

type Predicate func(Value) bool

Predicate is a predicate.

type Value Uses

type Value string

Value indicates the state of some entity.

const (
    // Alive indicates that some entity is meant to exist.
    Alive Value = "alive"

    // Dying indicates that some entity should be removed.
    Dying Value = "dying"

    // Dead indicates that some entity is no longer useful,
    // and can be destroyed unconditionally.
    Dead Value = "dead"
)

func (Value) Validate Uses

func (v Value) Validate() error

Validate returns an error if the value is not known.

Package life imports 1 packages (graph) and is imported by 118 packages. Updated 2019-03-14. Refresh now. Tools for package owners.