containers

package
v0.0.0-...-e0721d9 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Zlib Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortainerContainer

type PortainerContainer struct {
	testcontainers.Container
	APIPort nat.Port
	APIHost string
	// contains filtered or unexported fields
}

PortainerContainer represents a Portainer container for testing

func NewPortainerContainer

func NewPortainerContainer(ctx context.Context, opts ...PortainerContainerOption) (*PortainerContainer, error)

NewPortainerContainer creates and starts a new Portainer container with the specified options

func (*PortainerContainer) GetAPIBaseURL

func (pc *PortainerContainer) GetAPIBaseURL() string

GetAPIBaseURL returns the base URL for the Portainer API

func (*PortainerContainer) GetAPIToken

func (pc *PortainerContainer) GetAPIToken() string

func (*PortainerContainer) GetHostAndPort

func (pc *PortainerContainer) GetHostAndPort() (string, string)

GetHostAndPort returns the host and port for the Portainer API

type PortainerContainerOption

type PortainerContainerOption func(*portainerContainerConfig)

PortainerContainerOption defines a function type for applying options to Portainer container configuration

func WithDockerSocketBind

func WithDockerSocketBind(bind bool) PortainerContainerOption

WithDockerSocketBind configures the container to bind mount the Docker socket

func WithImage

func WithImage(image string) PortainerContainerOption

WithImage sets a custom Portainer image

Jump to

Keyboard shortcuts

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