Documentation
¶
Index ¶
- Variables
- func DescribeFacades() []params.FacadeVersions
- func IsMethodAllowedDuringUpgrade(rootName, methodName string) bool
- func NewAllWatcher(st *state.State, resources *common.Resources, auth common.Authorizer, ...) (interface{}, error)
- type EntityWatcher
- type LogMessage
- type LoginValidator
- type Pinger
- type Server
- type ServerConfig
- type SrvAllWatcher
Constants ¶
This section is empty.
Variables ¶
var AboutToRestoreError = errors.New("restore preparation in progress")
var MaintenanceNoLoginError = errors.New("login failed - maintenance in progress")
var RestoreInProgressError = errors.New("restore in progress")
var UpgradeInProgressError = errors.New("upgrade in progress")
Functions ¶
func DescribeFacades ¶
func DescribeFacades() []params.FacadeVersions
DescribeFacades returns the list of available Facades and their Versions
func NewAllWatcher ¶
func NewAllWatcher(st *state.State, resources *common.Resources, auth common.Authorizer, id string) (interface{}, error)
NewAllEnvWatcher returns a new API server endpoint for interacting with a watcher created by the WatchAll and WatchAllEnvs API calls.
Types ¶
type EntityWatcher ¶
type EntityWatcher interface { state.StringsWatcher // MapChanges maps the received strings to their according tag strings. // The EntityFinder interface representing state or a mock has to be // upcasted into the needed sub-interface of state for the real mapping. MapChanges(in []string) ([]string, error) }
EntityWatcher defines an interface based on the StringsWatcher but also providing a method for the mapping of the received strings to the tags of the according entities.
type LogMessage ¶
type LogMessage struct { Time time.Time `json:"t"` Module string `json:"m"` Location string `json:"l"` Level loggo.Level `json:"v"` Message string `json:"x"` }
LogMessage is used to transmit log messages to the logsink API endpoint. Single character field names are used for serialisation to keep the size down. These messages are going to be sent a lot.
type LoginValidator ¶
type LoginValidator func(params.LoginRequest) error
LoginValidator functions are used to decide whether login requests are to be allowed. The validator is called before credentials are checked.
type Pinger ¶
type Pinger interface { Ping() Stop() error }
pinger describes a resource that can be pinged and stopped.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the server side of the API.
func NewServer ¶
NewServer serves the given state by accepting requests on the given listener, using the given certificate and key (in PEM format) for authentication.
func (*Server) Dead ¶
func (srv *Server) Dead() <-chan struct{}
Dead returns a channel that signals when the server has exited.
type ServerConfig ¶
type ServerConfig struct { Cert []byte Key []byte Tag names.Tag DataDir string LogDir string Validator LoginValidator CertChanged chan params.StateServingInfo }
ServerConfig holds parameters required to set up an API server.
type SrvAllWatcher ¶
type SrvAllWatcher struct {
// contains filtered or unexported fields
}
SrvAllWatcher defines the API methods on a state.Multiwatcher. which watches any changes to the state. Each client has its own current set of watchers, stored in resources. It is used by both the AllWatcher and AllEnvWatcher facades.
func (*SrvAllWatcher) Next ¶
func (aw *SrvAllWatcher) Next() (params.AllWatcherNextResults, error)
func (*SrvAllWatcher) Stop ¶
func (w *SrvAllWatcher) Stop() error
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
The machine package implements the API interfaces used by the machine agent.
|
The machine package implements the API interfaces used by the machine agent. |
storagecommon
Package storagecommon provides common storage-related services for API server facades.
|
Package storagecommon provides common storage-related services for API server facades. |
The environmentmanager package defines an API end point for functions dealing with envionments.
|
The environmentmanager package defines an API end point for functions dealing with envionments. |
The machiner package implements the API interface used by the machiner worker.
|
The machiner package implements the API interface used by the machiner worker. |
Package meterstatus provides the meter status API facade.
|
Package meterstatus provides the meter status API facade. |
Package metricsender contains functions for sending metrics from a state server to a remote metric collector.
|
Package metricsender contains functions for sending metrics from a state server to a remote metric collector. |
wireformat
Package wireformat defines the format that will be used to send metric batches to the collector and receive updates.
|
Package wireformat defines the format that will be used to send metric batches to the collector and receive updates. |
Package metricsmanager contains the implementation of an api endpoint for calling metrics functions in state.
|
Package metricsmanager contains the implementation of an api endpoint for calling metrics functions in state. |
The resumer package implements the API interface used by the resumer worker.
|
The resumer package implements the API interface used by the resumer worker. |
Package service contains api calls for functionality related to deploying and managing services and their related charms.
|
Package service contains api calls for functionality related to deploying and managing services and their related charms. |
Package storage provides an API server facade for managing storage entities.
|
Package storage provides an API server facade for managing storage entities. |
The systemmanager package defines an API end point for functions dealing with systems as a whole.
|
The systemmanager package defines an API end point for functions dealing with systems as a whole. |
The uniter package implements the API interface used by the uniter worker.
|
The uniter package implements the API interface used by the uniter worker. |