cluster

package
v2.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	GetResources() ([]Node, error)

	ListContainers(showAll bool, showSize bool, filters ...string) ([]adoc.Container, error)
	CreateContainer(cc adoc.ContainerConfig, hc adoc.HostConfig, nc adoc.NetworkingConfig, name ...string) (string, error)
	ConnectContainer(networkName string, id string, ipAddr string) error
	DisconnectContainer(networkName string, id string, force bool) error
	StartContainer(id string) error
	StopContainer(id string, timeout ...int) error
	RestartContainer(id string, timeout ...int) error
	InspectContainer(id string) (adoc.ContainerDetail, error)
	RemoveContainer(id string, force bool, volumes bool) error
	RenameContainer(id string, name string) error

	MonitorEvents(filter string, callback adoc.EventCallback) int64
	StopMonitor(monitorId int64)
}

type Node

type Node struct {
	Name       string
	Address    string
	Containers int64
	CPUs       int
	UsedCPUs   int
	Memory     int64
	UsedMemory int64
}

func (Node) SpareCPUs

func (n Node) SpareCPUs() int

func (Node) SpareMemory

func (n Node) SpareMemory() int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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