Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Docker repository. Repository = "nats" // Default tag. DefaultTag = "2.1.7-alpine" // Default container expire time. DefaultExpire uint = 120 )
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Tag of the repository. Default: DefaultTag. Tag string // If specified, the port 4222/tcp will be mapped to it. Default: random port. HostPort uint16 // If specified, the port 8222/tcp will be mapped to it. Default: random port. HostMonPort uint16 // If specified, the port 6222/tcp will be mapped to it. Default: random port. HostClusterPort uint16 // Expire time (in seconds) of the container. Default: DefaultExpire. Expire uint // BaseRunOptions is the base options, will be overrided by above. BaseRunOptions dockertest.RunOptions }
Options is options to run a test nats server.
type Resource ¶
type Resource struct { // Nats streaming server docker container. *dockertest.Resource // Actual options. Options }
Resource represents a test nats server.
func RunFromPool ¶
RunFromPool runs a test nats server. If pool is nil, tstsvc.DefaultPool() will be used. If opts is nil, the default options will be used.
func (*Resource) NatsClient ¶
NatsClient returns a nats client of the embedded nats server of the test nats streaming server.
Click to show internal directories.
Click to hide internal directories.