docker

package
v0.0.0-...-3ce40ce Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

https://github.com/docker/cli/blob/master/cli/command/events_utils.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID     string
	Name   string
	Veth   string
	TcRate string
	TcCeil string
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(ctx context.Context, dc *client.Client) *Container

func (*Container) EventDie

func (c *Container) EventDie(h func(Container) error) <-chan error

func (*Container) EventStart

func (c *Container) EventStart(h func(Container) error) <-chan error

func (*Container) GetRunningList

func (c *Container) GetRunningList() ([]*Container, error)

func (*Container) GetVeths

func (c *Container) GetVeths(name, sandboxKey string) ([]string, error)

func (*Container) RemoveVeth

func (c *Container) RemoveVeth(name string) error

type EventHandler

type EventHandler interface {
	Handle(action string, h func(eventtypes.Message))
	Watch(c <-chan eventtypes.Message)
}

EventHandler is abstract interface for user to customize own handle functions of each type of events

func InitEventHandler

func InitEventHandler() EventHandler

InitEventHandler initializes and returns an EventHandler

type Veth

type Veth struct {
	Device    string
	Ident     string
	LinkIdent string
}

Jump to

Keyboard shortcuts

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