Documentation
¶
Overview ¶
Package sess provides options for creating (test) sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
Opt is a configuration option for creating sessions using github.com/thediveo/morbyd.NewSession.
func WithAutoCleaning ¶
WithAutoCleaning enables autocleaning containers and networks before and after test sessions, in either “KEY=VALUE” or “KEY=” format. This label is automatically attached to any container and network created in a test session.
func WithDockerOpts ¶
WithDockerOpts specifies additional options to apply when creating the Docker client as part of a new session.
func WithLabel ¶
WithLabel specifies a single key-value label to be automatically attached to container images, containers, and networks created in this session. These labels can be used, for instance, to automatically clean up any left-over images, containers, and networks.
func WithLabels ¶
WithLabels specifies multiple key-value labels to be automatically attached to container images, containers, and networks created in this session. These labels can be used, for instance, to automatically clean up any left-over images, containers, and networks.
type Options ¶
type Options struct {
Labels map[string]string
DockerClientOpts []client.Opt
// If not "", then AutoCleaningLabel specifies a label that when stuck on
// containers and networks identifies them for automatic cleaning before and
// after test sessions. Please note that the auto-cleaning label is also
// added to the session labels in order to automatically attach it to newly
// created containers and networks.
AutoCleaningLabel string
// A function supplied by a test option to wrap the Docker client with
// something else, such as a mock, double, or whatever you wanna call it.
Wrapper func(moby.Client) moby.Client
}
Options stores the configuration options when creating a new testing session, including a Docker client.