systemmanager

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

The systemmanager package defines an API end point for functions dealing with systems as a whole. Primarily the destruction of systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemManager

type SystemManager interface {
	AllEnvironments() (params.UserEnvironmentList, error)
	DestroySystem(args params.DestroySystemArgs) error
	EnvironmentConfig() (params.EnvironmentConfigResults, error)
	ListBlockedEnvironments() (params.EnvironmentBlockInfoList, error)
	RemoveBlocks(args params.RemoveBlocksArgs) error
	WatchAllEnvs() (params.AllWatcherId, error)
}

SystemManager defines the methods on the systemmanager API end point.

type SystemManagerAPI

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

SystemManagerAPI implements the environment manager interface and is the concrete implementation of the api end point.

func NewSystemManagerAPI

func NewSystemManagerAPI(
	st *state.State,
	resources *common.Resources,
	authorizer common.Authorizer,
) (*SystemManagerAPI, error)

NewSystemManagerAPI creates a new api server endpoint for managing environments.

func (*SystemManagerAPI) AllEnvironments

func (s *SystemManagerAPI) AllEnvironments() (params.UserEnvironmentList, error)

AllEnvironments allows system administrators to get the list of all the environments in the system.

func (*SystemManagerAPI) DestroySystem

func (s *SystemManagerAPI) DestroySystem(args params.DestroySystemArgs) error

DestroySystem will attempt to destroy the system. If the args specify the removal of blocks or the destruction of the environments, this method will attempt to do so.

func (*SystemManagerAPI) EnvironmentConfig

func (s *SystemManagerAPI) EnvironmentConfig() (params.EnvironmentConfigResults, error)

EnvironmentConfig returns the environment config for the system environment. For information on the current environment, use client.EnvironmentGet

func (*SystemManagerAPI) ListBlockedEnvironments

func (s *SystemManagerAPI) ListBlockedEnvironments() (params.EnvironmentBlockInfoList, error)

ListBlockedEnvironments returns a list of all environments on the system which have a block in place. The resulting slice is sorted by environment name, then owner. Callers must be system administrators to retrieve the list.

func (*SystemManagerAPI) RemoveBlocks

func (s *SystemManagerAPI) RemoveBlocks(args params.RemoveBlocksArgs) error

RemoveBlocks removes all the blocks in the system.

func (*SystemManagerAPI) WatchAllEnvs

func (c *SystemManagerAPI) WatchAllEnvs() (params.AllWatcherId, error)

WatchAllEnvs starts watching events for all environments in the system. The returned AllWatcherId should be used with Next on the AllEnvWatcher endpoint to receive deltas.

Jump to

Keyboard shortcuts

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