containers

package
v0.0.0-...-31d5520 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDFormat = time.RFC3339Nano
)

Variables

View Source
var (
	Log       = log.New()
	LoggerKey = struct{}{}
)
View Source
var (
	InspectTimeout = 200 * time.Millisecond
)

Functions

This section is empty.

Types

type Container

type Container struct {
	ID        ID
	CreatedAt time.Time
	UpdatedAt time.Time
	Name      string
	Image     string
	Status    Status
	Healthy   string   `json:",omitempty"`
	Service   string   `json:",omitempty"`
	Project   *Project `json:",omitempty"`
	Networks  map[string]*Network
	Mounts    []Mount
	Ports     map[string]Port
}

func (*Container) LastUpdateTime

func (c *Container) LastUpdateTime() time.Time

func (*Container) UpdateFrom

func (c *Container) UpdateFrom(data types.ContainerJSON)

type ContainerRemoved

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

func (*ContainerRemoved) Data

func (c *ContainerRemoved) Data() any

func (*ContainerRemoved) ID

func (c *ContainerRemoved) ID() string

type ContainerUpdated

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

func (*ContainerUpdated) Data

func (c *ContainerUpdated) Data() any

func (*ContainerUpdated) ID

func (c *ContainerUpdated) ID() string

type Dispatcher

type Dispatcher interface {
	Dispatch(value api.Event, ctx context.Context) error
	OnNewSubscriber(hook func(chan<- api.Event))
}

type ID

type ID string

func (ID) String

func (i ID) String() string

type Mount

type Mount struct {
	Name        string
	Type        string
	Source      string
	Destination string
	ReadWrite   bool
}

type Network

type Network struct {
	ID   string
	Name string
}

type Port

type Port struct {
	HostIp   string
	HostPort int
}

type Project

type Project struct {
	Name       string
	WorkingDir string
}

type Repository

type Repository struct {
	ConnFactory connections.Factory
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(dispatcher Dispatcher, connFactory connections.Factory) (r *Repository)

func (*Repository) GoString

func (r *Repository) GoString() string

func (*Repository) Process

func (r *Repository) Process(msg events.Message)

func (*Repository) Serve

func (r *Repository) Serve(ctx context.Context) (err error)

type Status

type Status string

func (Status) IsRemoved

func (s Status) IsRemoved() bool

func (Status) IsRunning

func (s Status) IsRunning() bool

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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