qinv

package
v0.0.0-...-f39c967 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	types.Container
}

Container holds informations about a container

func NewContainer

func NewContainer(c types.Container) (Container, error)

NewContainer returns a container instance

func (*Container) GetID

func (c *Container) GetID() string

GetID returns the ID of the container, which will be used as unique identifier in the backends

type DockerEngine

type DockerEngine struct {
	ID         string
	DockerHost string
}

DockerEngine holds the information of an Machine

func NewDockerEngine

func NewDockerEngine(id, dhost string) (DockerEngine, error)

NewDockerEngine returns a DockerEngine instance

func (*DockerEngine) GetID

func (e *DockerEngine) GetID() string

GetID returns the engine's ID

type Machine

type Machine struct {
	ID       string `json:"id"`
	Hostname string `json:"hostname"`
	Kernel   string `json:"kernel"`
}

Machine holds informations about a container

func NewMachine

func NewMachine(hostname, kernel string) (Machine, error)

NewMachine returns a container instance

func (*Machine) GetID

func (m *Machine) GetID() string

GetID returns the ID of the instance

func (*Machine) GetMe

func (m *Machine) GetMe() QEntity

GetMe returns self as Qentity

type QEntity

type QEntity interface {
	GetID() string
	GetMe() QEntity
}

QEntity covers all entities within the inventory (machine, container, docker-engine)

type QInventory

type QInventory interface {
	AddMachine(m Machine)
	AddContainer(c Container)
}

QInventory provides an interface for all backends

Jump to

Keyboard shortcuts

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