-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: custom network for etcd and pulsar (#468)
- Loading branch information
Showing
3 changed files
with
92 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
package pulsar | ||
|
||
type Opt func(*Config) | ||
import ( | ||
"github.com/ory/dockertest/v3/docker" | ||
) | ||
|
||
func WithTag(tag string) Opt { | ||
return func(c *Config) { | ||
c.Tag = tag | ||
type Option func(*config) | ||
|
||
func WithTag(tag string) Option { | ||
return func(c *config) { | ||
c.tag = tag | ||
} | ||
} | ||
|
||
func WithNetwork(network *docker.Network) Option { | ||
return func(c *config) { | ||
c.network = network | ||
} | ||
} | ||
|
||
type Config struct { | ||
Tag string | ||
type config struct { | ||
tag string | ||
network *docker.Network | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters