backend

package
v1.0.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Die = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

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

func NewDocker

func NewDocker(alias, bw2Router string) (*Docker, error)

func (*Docker) ListServices

func (dkr *Docker) ListServices(ctx context.Context) ([]string, error)

func (*Docker) MonitorService

func (dkr *Docker) MonitorService(ctx context.Context, id string) (<-chan Event, <-chan error)

func (*Docker) ProfileService

func (dkr *Docker) ProfileService(ctx context.Context, id string, period time.Duration) (<-chan Stats, <-chan error)

func (*Docker) RemoveService

func (dkr *Docker) RemoveService(ctx context.Context, id string) error

func (*Docker) RestartService

func (dkr *Docker) RestartService(ctx context.Context, id string) error

func (*Docker) StartService

func (dkr *Docker) StartService(ctx context.Context, svcConfig *service.Configuration) (string, error)

func (*Docker) StopService

func (dkr *Docker) StopService(ctx context.Context, id string) error

func (*Docker) TailService

func (dkr *Docker) TailService(ctx context.Context, id string, log bool) (<-chan string, <-chan error)

type Event

type Event int

type ServiceBackend

type ServiceBackend interface {
	StartService(ctx context.Context, config *service.Configuration) (string, error)
	RestartService(ctx context.Context, id string) error
	StopService(ctx context.Context, id string) error
	RemoveService(ctx context.Context, id string) error
	ListServices(ctx context.Context) ([]string, error)
	TailService(ctx context.Context, id string, log bool) (<-chan string, <-chan error)
	MonitorService(ctx context.Context, id string) (<-chan Event, <-chan error)
	ProfileService(ctx context.Context, id string, period time.Duration) (<-chan Stats, <-chan error)
}

type Stats

type Stats struct {
	Memory    float64
	CPUShares float64
}

Jump to

Keyboard shortcuts

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