Documentation ¶
Overview ¶
Package docker contains resources needed to setup docker containers for M3 tests.
Index ¶
- func AttachToExistingContainers(coordinatorContainerName string, dbNodesContainersNames []string) (resources.M3Resources, error)
- func NewPrometheus(opts PrometheusOptions) resources.ExternalResources
- func SetupSingleM3DBNode(opts ...SetupOptions) (resources.M3Resources, error)
- type PrometheusOptions
- type SetupOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachToExistingContainers ¶
func AttachToExistingContainers( coordinatorContainerName string, dbNodesContainersNames []string, ) (resources.M3Resources, error)
AttachToExistingContainers attaches docker API to an existing coordinator and one or more dbnode containers.
func NewPrometheus ¶ added in v1.3.0
func NewPrometheus(opts PrometheusOptions) resources.ExternalResources
NewPrometheus creates a new docker-backed Prometheus that implements the resources.ExternalResources interface.
func SetupSingleM3DBNode ¶
func SetupSingleM3DBNode(opts ...SetupOptions) (resources.M3Resources, error)
SetupSingleM3DBNode creates docker resources representing a setup with a single DB node.
Types ¶
type PrometheusOptions ¶ added in v1.3.0
type PrometheusOptions struct { // Pool is the connection to the docker API Pool *dockertest.Pool // PathToCfg contains the path to the prometheus.yml configuration // file to be used on startup. PathToCfg string // InstrumentOptions are the instrument.Options to use when // creating the resource. InstrumentOptions instrument.Options }
PrometheusOptions contains the options for spinning up docker container running Prometheus
type SetupOptions ¶
type SetupOptions func(*setupOptions)
SetupOptions is a setup option.
func WithCoordinatorImage ¶
func WithCoordinatorImage(name, tag string) SetupOptions
WithCoordinatorImage sets an option to use an image name and tag for the coordinator.
func WithDBNodeImage ¶
func WithDBNodeImage(name, tag string) SetupOptions
WithDBNodeImage sets an option to use an image name and tag for the DB node.
func WithExistingCluster ¶
func WithExistingCluster(dbNodeContainerName, coordinatorContainerName string) SetupOptions
WithExistingCluster sets the names of already running containers dbnode and coordinator containers that should be used for tests.