mongo

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultStartupTimeout = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr added in v0.2.5

type Addr struct {
	Host string
	Port uint
}

type Container

type Container struct {
	Container testcontainers.Container
	tc.ContainerConfig
	Host     string
	Port     uint
	User     string
	Password string
}

Container ...

func Start

func Start(ctx context.Context, options Options) (Container, error)

Start ...

func (*Container) ConnectionURI

func (c *Container) ConnectionURI() string

ConnectionURI ...

func (*Container) Terminate

func (c *Container) Terminate(ctx context.Context)

Terminate ...

type Options

type Options struct {
	tc.ContainerOptions
	User           string
	Port           int
	Password       string
	ImageTag       string
	StartupTimeout time.Duration
}

Options ...

type ReplicaSetContainer added in v0.2.5

type ReplicaSetContainer struct {
	MasterContainer     testcontainers.Container
	ReplicaSet1         testcontainers.Container
	ReplicaSet2         testcontainers.Container
	MasterContainerAddr Addr
	ReplicaSet1Addr     Addr
	ReplicaSet2Addr     Addr
	ContainerNames      []string
	NetworkName         string
	Network             testcontainers.Network
	User                string
	Password            string
}

func StartReplicaSet added in v0.2.5

func StartReplicaSet(ctx context.Context, options Options) (cont *ReplicaSetContainer, err error)

func (*ReplicaSetContainer) MasterConnectionURI added in v0.2.5

func (c *ReplicaSetContainer) MasterConnectionURI() string

func (*ReplicaSetContainer) ReplicaSet1ConnectionURI added in v0.2.5

func (c *ReplicaSetContainer) ReplicaSet1ConnectionURI() string

func (*ReplicaSetContainer) ReplicaSet2ConnectionURI added in v0.2.5

func (c *ReplicaSetContainer) ReplicaSet2ConnectionURI() string

func (*ReplicaSetContainer) Terminate added in v0.2.5

func (c *ReplicaSetContainer) Terminate(ctx context.Context)

Jump to

Keyboard shortcuts

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