Documentation ¶
Index ¶
- Variables
- type Address
- type Container
- type Contract
- type CreateParams
- type Environment
- type ImagePullParams
- type Manager
- func (p *Manager) Cleanup(ctx context.Context) (err error)
- func (p *Manager) Create(ctx context.Context, params CreateParams) (container *Container, err error)
- func (p *Manager) CreateAndStart(ctx context.Context, params CreateParams, opts ...StartOption) (container *Container, err error)
- func (p *Manager) PullImage(ctx context.Context, params ImagePullParams) (err error)
- func (p *Manager) RefreshState(ctx context.Context, params RefreshParams) (container *Container, err error)
- func (p *Manager) Start(ctx context.Context, params StartParams, opts ...StartOption) (container *Container, err error)
- func (p *Manager) Stop(ctx context.Context, params StopParams) (err error)
- type Migrations
- type RefreshParams
- type StartOption
- type StartParams
- type StopParams
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPostgresImage = "postgres:14"
View Source
var ErrContainerNotFound = errors.New("container not found")
View Source
var ErrPortNotFound = errors.New("port not found")
View Source
var ErrStartTimeout = errors.New("timeout waiting for container to start")
View Source
var ManagerContextStore = ctxutil.NewStore[*Manager, containerManagerCtxKey]()
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string Name string Config CreateParams Info types.ContainerJSON }
type CreateParams ¶
type CreateParams struct { Name string Platform *imagev1.Platform Container *containerapi.Config Host *containerapi.HostConfig Network *networkapi.NetworkingConfig }
type Environment ¶
func (Environment) ToSlice ¶
func (e Environment) ToSlice() (result []string)
type ImagePullParams ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) CreateAndStart ¶
func (p *Manager) CreateAndStart(ctx context.Context, params CreateParams, opts ...StartOption) (container *Container, err error)
func (*Manager) PullImage ¶
func (p *Manager) PullImage(ctx context.Context, params ImagePullParams) (err error)
func (*Manager) RefreshState ¶
func (*Manager) Start ¶
func (p *Manager) Start(ctx context.Context, params StartParams, opts ...StartOption) (container *Container, err error)
type Migrations ¶
type RefreshParams ¶
type RefreshParams struct {
Name string
}
type StartOption ¶
func WaitForPort ¶
func WaitForPort(port string) StartOption
type StartParams ¶
type StopParams ¶
func NewDefaultStopParams ¶
func NewDefaultStopParams(id string) *StopParams
Click to show internal directories.
Click to hide internal directories.