conman

package
v0.0.0-...-4feb759 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDomain = fmt.Errorf("invalid domain name specified")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// EventChan receives container events.
	EventChan <-chan *dockmon.Event
	// Dbman is a pointer to a db.Manager instance.
	Dbman *dbman.Manager
}

Config provides the configuration for the container manager.

type Conman

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

Conman manages running containers based on Docker events.

func New

func New(cfg *Config) *Conman

New creates a new container manager.

func (*Conman) Add

func (c *Conman) Add(con *container.Container)

func (*Conman) Close

func (c *Conman) Close()

Close shuts down the container manager.

func (*Conman) Info

func (c *Conman) Info() []container.ContainerData

Info returns information about running containers.

func (*Conman) Lookup

func (c *Conman) Lookup(name string) (*container.Container, error)

Lookup attempts to retrieve the container for the provided domain name.

func (*Conman) Remove

func (c *Conman) Remove(con *container.Container)

func (*Conman) ToggleState

func (c *Conman) ToggleState(con *container.Container, running bool)

Jump to

Keyboard shortcuts

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