docker

package
v0.0.0-...-1c5d739 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendAction

func SendAction(conn client.Connection, action *Action) (string, error)

SendAction sends an action request to a particular host

Types

type Action

type Action struct {
	HostID   string
	DockerID string
	Command  []string
	// contains filtered or unexported fields
}

Action is the request node for initialized a serviced action on a host

func (*Action) SetVersion

func (a *Action) SetVersion(version interface{})

SetVersion is an implementation of client.Node

func (*Action) Version

func (a *Action) Version() interface{}

Version is an implementation of client.Node

type ActionHandler

type ActionHandler interface {
	AttachAndRun(dockerID string, command []string) ([]byte, error)
}

ActionHandler handles all non-zookeeper interactions required by the Action

type ActionListener

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

ActionListener is the listener object for /docker/actions

func NewActionListener

func NewActionListener(handler ActionHandler, hostID string) *ActionListener

NewActionListener instantiates a new action listener for /docker/actions

func (*ActionListener) Done

func (l *ActionListener) Done()

Done implements zzk.Listener

func (*ActionListener) GetPath

func (l *ActionListener) GetPath(nodes ...string) string

GetPath implements zzk.Listener

func (*ActionListener) PostProcess

func (l *ActionListener) PostProcess(p map[string]struct{})

PostProcess implements zzk.Listener

func (*ActionListener) Ready

func (l *ActionListener) Ready() (err error)

Ready implements zzk.Listener

func (*ActionListener) SetConnection

func (l *ActionListener) SetConnection(conn client.Connection)

GetConnection implements zzk.Listener

func (*ActionListener) Spawn

func (l *ActionListener) Spawn(shutdown <-chan interface{}, actionID string)

Spawn attaches to a container and performs the requested action

Jump to

Keyboard shortcuts

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