container

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

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ContainerData
	Database *Database
	Handler  http.Handler
	Proxy    *proxy.Proxy
}

Container represents configuration for a Docker container with i5 metadata.

func New

func New(id, name string, labels map[string]string, running bool) (*Container, error)

New creates a new Container instance from the provided labels.

func (*Container) Started

func (c *Container) Started()

Started switches the handler to the proxy for the container.

func (*Container) Stopped

func (c *Container) Stopped()

Stopped switches the handler to the static "stopped" message.

type ContainerData

type ContainerData struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Title       string   `json:"title"`
	Domains     []string `json:"domains"`
	Insecure    bool     `json:"insecure"`
	Running     bool     `json:"running"`
	Maintenance bool     `json:"maintenance"`
	Uptime      int64    `json:"uptime"`
}

ContainerData provides a base type for container data.

type Database

type Database struct {
	Driver   string
	Name     string
	User     string
	Password string
}

Database represents database requirements for a container.

Jump to

Keyboard shortcuts

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