Documentation ¶
Overview ¶
Copyright 2016 Canonical Ltd. Licensed under the AGPLv3, see LICENCE file for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector is a prometheus.Collector that collects metrics about the Juju global state.
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
Collect is part of the prometheus.Collector interface.
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
Describe is part of the prometheus.Collector interface.
type Machine ¶
type Machine interface { InstanceStatus() (status.StatusInfo, error) Life() state.Life Status() (status.StatusInfo, error) }
Machine represents a machine in a Juju model.
type Model ¶
type Model interface { Life() state.Life ModelTag() names.ModelTag Status() (status.StatusInfo, error) }
Model represents a Juju model.
type PooledState ¶
type PooledState interface { state.PoolHelper State }
PooledState is a wrapper for State that includes methods to negotiate with the pool that supplied it.
type State ¶
type State interface { AllMachines() ([]Machine, error) AllModelUUIDs() ([]string, error) AllUsers() ([]User, error) ControllerTag() names.ControllerTag UserAccess(names.UserTag, names.Tag) (permission.UserAccess, error) }
State represents the global state managed by the Juju controller.
type StatePool ¶
type StatePool interface { SystemState() State Get(modelUUID string) (PooledState, error) GetModel(modelUUID string) (Model, state.PoolHelper, error) }
StatePool represents a pool of State objects.
func NewStatePool ¶
NewStatePool takes a *state.StatePool, and returns a StatePool value backed by it.