connector

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 19 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled added in v0.7.1

func Enabled() (a []string)

Enabled returns names for all enabled connectors on the current platform

Types

type Connector

type Connector interface {
	// All returns a pre-sorted container.Containers of all discovered containers
	All() container.Containers
	// Get returns a single container.Container by ID
	Get(string) (*container.Container, bool)
	// Wait blocks until the underlying connection is lost
	Wait() struct{}
}

func NewDocker

func NewDocker() (Connector, error)

func NewMock

func NewMock() (Connector, error)

func NewRunc

func NewRunc() (Connector, error)

type ConnectorFn added in v0.7.3

type ConnectorFn func() (Connector, error)

type ConnectorSuper added in v0.7.3

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

ConnectorSuper provides initial connection and retry on failure for an undlerying Connector type

func ByName

func ByName(s string) (*ConnectorSuper, error)

ByName returns a ConnectorSuper for a given name, or error if the connector does not exists on the current platform

func NewConnectorSuper added in v0.7.3

func NewConnectorSuper(connFn ConnectorFn) *ConnectorSuper

func (*ConnectorSuper) Get added in v0.7.3

func (cs *ConnectorSuper) Get() (Connector, error)

Get returns the underlying Connector, or nil and an error if the Connector is not yet initialized or is disconnected.

type Docker

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

func (*Docker) All

func (cm *Docker) All() (containers container.Containers)

Docker implements Connector

func (*Docker) Get

func (cm *Docker) Get(id string) (*container.Container, bool)

Docker implements Connector

func (*Docker) Loop

func (cm *Docker) Loop()

func (*Docker) LoopStatuses added in v0.7.6

func (cm *Docker) LoopStatuses()

func (*Docker) MustGet

func (cm *Docker) MustGet(id string) *container.Container

MustGet gets a single container, creating one anew if not existing

func (*Docker) Wait added in v0.7.3

func (cm *Docker) Wait() struct{}

Docker implements Connector

type Mock

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

func (*Mock) All

func (cs *Mock) All() container.Containers

All returns array of all containers, sorted by field

func (*Mock) Get

func (cs *Mock) Get(id string) (*container.Container, bool)

Get a single container, by ID

func (*Mock) Init

func (cs *Mock) Init()

Create Mock containers

func (*Mock) Loop

func (cs *Mock) Loop()

func (*Mock) Wait added in v0.7.3

func (cs *Mock) Wait() struct{}

type Runc

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

func (*Runc) All

func (cm *Runc) All() (containers container.Containers)

Runc implements Connector

func (*Runc) Get

func (cm *Runc) Get(id string) (*container.Container, bool)

Runc implements Connector

func (*Runc) GetLibc

func (cm *Runc) GetLibc(id string) libcontainer.Container

func (*Runc) Loop

func (cm *Runc) Loop()

func (*Runc) MustGet

func (cm *Runc) MustGet(id string) *container.Container

MustGet gets a single ctop container in the map matching libc container, creating one anew if not existing

func (*Runc) Wait added in v0.7.3

func (cm *Runc) Wait() struct{}

Runc implements Connector

type RuncOpts

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

func NewRuncOpts

func NewRuncOpts() (RuncOpts, error)

type StatusUpdate added in v0.7.6

type StatusUpdate struct {
	Cid    string
	Field  string // "status" or "health"
	Status string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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