apiserver

package
v0.0.0-...-be26699 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 94 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AboutToRestoreError = errors.New("restore preparation in progress")
View Source
var MaintenanceNoLoginError = errors.New("login failed - maintenance in progress")
View Source
var RestoreInProgressError = errors.New("restore in progress")
View Source
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 IsMethodAllowedDuringUpgrade

func IsMethodAllowedDuringUpgrade(rootName, methodName string) bool

Types

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.

func NewPinger

func NewPinger(st *state.State, resources *common.Resources, authorizer common.Authorizer) (Pinger, error)

NewPinger returns an object that can be pinged by calling its Ping method. If this method is not called frequently enough, the connection will be dropped.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds the server side of the API.

func NewServer

func NewServer(s *state.State, lis net.Listener, cfg ServerConfig) (*Server, error)

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) Addr

func (srv *Server) Addr() *net.TCPAddr

Addr returns the address that the server is listening on.

func (*Server) Dead

func (srv *Server) Dead() <-chan struct{}

Dead returns a channel that signals when the server has exited.

func (*Server) Kill

func (srv *Server) Kill()

Kill implements worker.Worker.Kill.

func (*Server) Stop

func (srv *Server) Stop() error

Stop stops the server and returns when all running requests have completed.

func (*Server) Wait

func (srv *Server) Wait() error

Wait implements worker.Worker.Wait.

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.

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.
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 functions for getting meterstatus information about units.
Package meterstatus provides functions for getting meterstatus information about units.
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.
The uniter package implements the API interface used by the uniter worker.
The uniter package implements the API interface used by the uniter worker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL