Documentation ¶
Index ¶
- type ComposeFinder
- type ContainerAdapter
- func (c *ContainerAdapter) Create(ctx context.Context, opts core.ContainerCreateOptions) (core.Container, error)
- func (c *ContainerAdapter) Exec(ctx context.Context, opts core.ContainerExecOptions) error
- func (c *ContainerAdapter) ExecWithOutput(ctx context.Context, opts core.ContainerExecOptions) ([]byte, error)
- func (c *ContainerAdapter) Find(ctx context.Context, opts core.ContainerFindOptions) (core.Container, error)
- func (c *ContainerAdapter) FindAll(ctx context.Context, opts core.ContainerFindOptions) ([]core.Container, error)
- func (c *ContainerAdapter) Inspect(ctx context.Context, ID string) (core.ContainerInspectResult, error)
- func (c *ContainerAdapter) Start(ctx context.Context, ID string) error
- func (c *ContainerAdapter) Stop(ctx context.Context, ID string) error
- type ContainerFinder
- type ContainerFn
- type Finder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposeFinder ¶
type ContainerAdapter ¶
func New ¶
func New(d core.Docker) *ContainerAdapter
func NewWithOpts ¶
func NewWithOpts(fns ...ContainerFn) *ContainerAdapter
func (*ContainerAdapter) Create ¶
func (c *ContainerAdapter) Create(ctx context.Context, opts core.ContainerCreateOptions) (core.Container, error)
Create creates container
func (*ContainerAdapter) Exec ¶
func (c *ContainerAdapter) Exec(ctx context.Context, opts core.ContainerExecOptions) error
func (*ContainerAdapter) ExecWithOutput ¶
func (c *ContainerAdapter) ExecWithOutput(ctx context.Context, opts core.ContainerExecOptions) ([]byte, error)
ExecWithOutput executes command and returns output
func (*ContainerAdapter) Find ¶
func (c *ContainerAdapter) Find(ctx context.Context, opts core.ContainerFindOptions) (core.Container, error)
Find finds current docker process and return container id
func (*ContainerAdapter) FindAll ¶
func (c *ContainerAdapter) FindAll(ctx context.Context, opts core.ContainerFindOptions) ([]core.Container, error)
FindAll finds current docker process (including stopped ones) and return container id
func (*ContainerAdapter) Inspect ¶
func (c *ContainerAdapter) Inspect(ctx context.Context, ID string) (core.ContainerInspectResult, error)
type ContainerFinder ¶
type ContainerFinder struct{}
type ContainerFn ¶
type ContainerFn func(*ContainerAdapter)
func WithDocker ¶
func WithDocker(d core.Docker) ContainerFn
func WithFinder ¶
func WithFinder(f Finder) ContainerFn
Click to show internal directories.
Click to hide internal directories.