Documentation ¶
Index ¶
Constants ¶
View Source
const ( ComposeStackNameLabel = "com.docker.compose.project" SwarmStackNameLabel = "com.docker.stack.namespace" )
Variables ¶
View Source
var (
ErrUnableToPingEndpoint = errors.New("Unable to communicate with the environment")
)
Docker errors
Functions ¶
func CreateClientFromEnv ¶
func CreateSimpleClient ¶
Types ¶
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is used to create Docker clients
func NewClientFactory ¶
func NewClientFactory(signatureService portainer.DigitalSignatureService, reverseTunnelService portainer.ReverseTunnelService) *ClientFactory
NewClientFactory returns a new instance of a ClientFactory
func (*ClientFactory) CreateClient ¶
func (factory *ClientFactory) CreateClient(endpoint *portainer.Endpoint, nodeName string, timeout *time.Duration) (*client.Client, error)
CreateClient is a generic function to create a Docker client based on a specific environment(endpoint) configuration. The nodeName parameter can be used with an agent enabled environment(endpoint) to target a specific node in an agent cluster. The underlying http client timeout may be specified, a default value is used otherwise.
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
Snapshotter represents a service used to create environment(endpoint) snapshots
func NewSnapshotter ¶
func NewSnapshotter(clientFactory *ClientFactory) *Snapshotter
NewSnapshotter returns a new Snapshotter instance
func (*Snapshotter) CreateSnapshot ¶
func (snapshotter *Snapshotter) CreateSnapshot(endpoint *portainer.Endpoint) (*portainer.DockerSnapshot, error)
CreateSnapshot creates a snapshot of a specific Docker environment(endpoint)
Click to show internal directories.
Click to hide internal directories.