dockerimpl

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientFromEnv

func NewClientFromEnv() (*client.Client, error)

Types

type Backend added in v0.18.0

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

func NewDockerBackend

func NewDockerBackend(
	c *client.Client,
	config Config,
	image builder.ImageConfig,
) (*Backend, error)

func (*Backend) AttachContainer added in v0.18.0

func (b *Backend) AttachContainer(ctx context.Context, appID string, stdin io.Reader, stdout, stderr io.Writer) error

func (*Backend) AvailableDomains added in v0.18.0

func (b *Backend) AvailableDomains() domain.AvailableDomainSlice

func (*Backend) AvailablePorts added in v0.18.0

func (b *Backend) AvailablePorts() domain.AvailablePortSlice

func (*Backend) Dispose added in v0.18.0

func (b *Backend) Dispose(_ context.Context) error

func (*Backend) ExecContainer added in v0.18.0

func (b *Backend) ExecContainer(ctx context.Context, appID string, cmd []string, stdin io.Reader, stdout, stderr io.Writer) error

func (*Backend) GetContainer added in v0.18.0

func (b *Backend) GetContainer(ctx context.Context, appID string) (*domain.Container, error)

func (*Backend) ListContainers added in v0.18.0

func (b *Backend) ListContainers(ctx context.Context) ([]*domain.Container, error)

func (*Backend) ListenContainerEvents added in v0.18.0

func (b *Backend) ListenContainerEvents() (sub <-chan *domain.ContainerEvent, unsub func())

func (*Backend) Start added in v0.18.0

func (b *Backend) Start(ctx context.Context) error

func (*Backend) Synchronize added in v0.18.0

func (b *Backend) Synchronize(ctx context.Context, s *domain.DesiredState) error

type Config

type Config struct {
	ConfDir string        `mapstructure:"confDir" yaml:"confDir"`
	Domains []*domainConf `mapstructure:"domains" yaml:"domains"`
	Ports   []*portConf   `mapstructure:"ports" yaml:"ports"`
	SS      struct {
		URL string `mapstructure:"url" yaml:"url"`
	} `mapstructure:"ss" yaml:"ss"`
	Network string       `mapstructure:"network" yaml:"network"`
	Labels  []*labelConf `mapstructure:"labels" yaml:"labels"`
	TLS     struct {
		CertResolver string `mapstructure:"certResolver" yaml:"certResolver"`
		Wildcard     struct {
			Domains domain.WildcardDomains `mapstructure:"domains" yaml:"domains"`
		} `mapstructure:"wildcard" yaml:"wildcard"`
	} `mapstructure:"tls" yaml:"tls"`
	Resources struct {
		CPUs              float64 `mapstructure:"cpus" yaml:"cpus"`
		Memory            int64   `mapstructure:"memory" yaml:"memory"`
		MemorySwap        int64   `mapstructure:"memorySwap" yaml:"memorySwap"`
		MemoryReservation int64   `mapstructure:"memoryReservation" yaml:"memoryReservation"`
	} `mapstructure:"resources" yaml:"resources"`
}

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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