rpc

package
v0.0.0-...-394a469 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocStream

func AllocStream(c *rpc.Client, addr string) (id uint32, conn net.Conn, err error)

func CallAll

func CallAll(addrs []string, f func(c *rpc.Client, addr string) (interface{}, error)) (map[string]interface{}, error)

func Dial

func Dial(network, address string) (*rpc.Client, error)

func Exec

func Exec(addrs []string, container string, cmd []string, interactive, tty bool) error

func ListContainers

func ListContainers(addrs []string, all bool) (map[string]interface{}, error)

func ListIPAddrs

func ListIPAddrs() ([]string, error)

func ListImages

func ListImages(addrs []string) (map[string]interface{}, error)

func ListenAndServe

func ListenAndServe(c *config.Config) error

func LoadImage

func LoadImage(addrs []string, r io.Reader, compress bool, bwlimit uint64) error

func LoadImageUsingPipeline

func LoadImageUsingPipeline(addrs []string, r io.Reader, compress bool, bwlimit uint64) error

func Logs

func Logs(addrs []string, container string, follow bool, tail string) error

func PullImage

func PullImage(addrs []string, image string) error

func RemoveContainer

func RemoveContainer(addrs []string, container string, force bool) error

func RemoveImage

func RemoveImage(addrs []string, name string) error

func RestartContainer

func RestartContainer(addrs []string, container string, timeout uint) error

func ShortHostname

func ShortHostname(s string, omitPort bool) string

func StartContainer

func StartContainer(addrs []string, container string) error

func StopContainer

func StopContainer(addrs []string, container string, timeout uint) error

Types

type AllocResponse

type AllocResponse struct {
	ID uint32
}

type ByNetworkType

type ByNetworkType []net.IP

func (ByNetworkType) Len

func (s ByNetworkType) Len() int

func (ByNetworkType) Less

func (s ByNetworkType) Less(i, j int) bool

func (ByNetworkType) Swap

func (s ByNetworkType) Swap(i, j int)

type Capability

type Capability struct {
	Available  bool
	Agent      string
	Labels     map[string]string
	IPAddrs    []string
	AllNames   []string
	UsedNames  []string
	UsedPorts  []int64
	Containers map[string]*docker.ContainerInfo
}

type Craft

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

func (*Craft) Capability

func (c *Craft) Capability(req Empty, resp *Capability) error

func (*Craft) Submit

func (c *Craft) Submit(req SubmitRequest, resp *SubmitResponse) error

type Docker

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

func NewDocker

func NewDocker(endpoint string) (*Docker, error)

func (*Docker) Exec

func (d *Docker) Exec(req ExecRequest, resp *Empty) (err error)

func (*Docker) ListContainers

func (d *Docker) ListContainers(req ListContainersRequest, resp *ListContainersResponse) error

func (*Docker) ListImages

func (d *Docker) ListImages(req Empty, resp *ListImagesResponse) (err error)

func (*Docker) LoadImage

func (d *Docker) LoadImage(req LoadImageRequest, resp *Empty) error

func (*Docker) Logs

func (d *Docker) Logs(req LogsRequest, resp *Empty) error

func (*Docker) PullImage

func (d *Docker) PullImage(req PullImageRequest, resp *Empty) error

func (*Docker) RemoveContainer

func (d *Docker) RemoveContainer(req RemoveContainerRequest, resp *Empty) error

func (*Docker) RemoveImage

func (d *Docker) RemoveImage(req string, resp *Empty) error

func (*Docker) RestartContainer

func (d *Docker) RestartContainer(req RestartContainerRequest, resp *Empty) error

func (*Docker) StartContainer

func (d *Docker) StartContainer(req string, resp *Empty) error

func (*Docker) StopContainer

func (d *Docker) StopContainer(req StopContainerRequest, resp *Empty) error

type Empty

type Empty struct{}

type Error

type Error map[string]error

func (Error) Each

func (e Error) Each(f func(string, error))

func (Error) Error

func (e Error) Error() string
type ExLink struct {
	Name    string
	Exposed string
	Addr    string
	Port    int
}

func (*ExLink) Env

func (l *ExLink) Env() map[string]string

type ExecRequest

type ExecRequest struct {
	Container   string
	Cmd         []string
	Interactive bool
	TTY         bool
	TTYWidth    int
	TTYHeight   int
	InStreamID  uint32
	OutStreamID uint32
	ErrStreamID uint32
}

type ListContainersRequest

type ListContainersRequest struct {
	All bool
}

type ListContainersResponse

type ListContainersResponse struct {
	Containers []docker.APIContainers
}

func (*ListContainersResponse) FilterByNames

func (r *ListContainersResponse) FilterByNames(names []string) []docker.APIContainers

type ListImagesResponse

type ListImagesResponse struct {
	Images []docker.APIImages
}

type LoadImageRequest

type LoadImageRequest struct {
	StreamID uint32
	Compress bool
	Rest     []string
}

type LogsRequest

type LogsRequest struct {
	Container   string
	Follow      bool
	Tail        string
	OutStreamID uint32
	ErrStreamID uint32
}

type PullImageRequest

type PullImageRequest struct {
	Image    string
	StreamID uint32
}

type RemoveContainerRequest

type RemoveContainerRequest struct {
	ID    string
	Force bool
}

type RestartContainerRequest

type RestartContainerRequest struct {
	ID      string
	Timeout uint
}

type StopContainerRequest

type StopContainerRequest struct {
	ID      string
	Timeout uint
}

type StreamConn

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

func NewStreamConn

func NewStreamConn() *StreamConn

func (*StreamConn) Alloc

func (s *StreamConn) Alloc(req Empty, resp *AllocResponse) error

type SubmitRequest

type SubmitRequest struct {
	Manifest *docker.Manifest
	ExLinks  []*ExLink
	StreamID uint32
}

type SubmitResponse

type SubmitResponse struct {
	Agent string
}

func Submit

func Submit(address string, m *docker.Manifest, exlinks []*ExLink) (*SubmitResponse, error)

Jump to

Keyboard shortcuts

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