dockerwrapper

package
v0.0.0-...-d69b078 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Channel chan *dockerapi.APIEvents

Channel is the docker API event channel

Functions

This section is empty.

Types

type Config

type Config struct {
	Socket string `mapstructure:"socket" version:"1"`
	Cert   string `mapstructure:"cert" version:"1"`
	Key    string `mapstructure:"key" version:"1"`
	CA     string `mapstructure:"ca" version:"1"`
}

Config for our docker connection

func NewConfig

func NewConfig() *Config

NewConfig returns a Docker Config with defaults

func (*Config) Hash

func (c *Config) Hash() string

Hash returns the unique hash for this config object

func (*Config) Target

func (c *Config) Target() *engine.NameSpace

Target returns the namespace of the target of this config

func (*Config) Version

func (c *Config) Version() int

Version of our config struct. TODO: automate

type Docker

type Docker struct {
	Client *dockerapi.Client
}

Docker defines a docker instance used to talk to docker

func GetObject

func GetObject() (*Docker, error)

GetObject returns the docker wrapper object

func (*Docker) Connect

func (d *Docker) Connect(cfg *Config) error

Connect to the socket.

func (*Docker) StartListener

func (d *Docker) StartListener() error

StartListener starts listening to the docker api.

func (*Docker) StopListener

func (d *Docker) StopListener() error

StopListener stops listening to the docker api.

Jump to

Keyboard shortcuts

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