MCPcopy Create free account
hub / github.com/efficientgo/e2e / NewConsul

Function NewConsul

db/db.go:121–136  ·  view source on GitHub ↗
(env e2e.Environment, name string, opts ...Option)

Source from the content-addressed store, hash-verified

119}
120
121func NewConsul(env e2e.Environment, name string, opts ...Option) *e2emon.InstrumentedRunnable {
122 o := options{image: "consul:1.8.4"}
123 for _, opt := range opts {
124 opt(&o)
125 }
126
127 e2e.MergeFlags()
128 return e2emon.AsInstrumented(env.Runnable(name).WithPorts(map[string]int{AccessPortName: 8500}).Init(
129 e2e.StartOptions{
130 Image: o.image,
131 // Run consul in "dev" mode so that the initial leader election is immediate.
132 Command: e2e.NewCommand("agent", "-server", "-client=0.0.0.0", "-dev", "-log-level=err"),
133 Readiness: e2e.NewHTTPReadinessProbe(AccessPortName, "/v1/operator/autopilot/health", 200, 200, `"Healthy": true`),
134 },
135 ), AccessPortName)
136}
137
138func NewDynamoDB(env e2e.Environment, name string, opts ...Option) *e2emon.InstrumentedRunnable {
139 o := options{image: "amazon/dynamodb-local:1.11.477"}

Callers

nothing calls this directly

Calls 7

MergeFlagsFunction · 0.92
NewCommandFunction · 0.92
NewHTTPReadinessProbeFunction · 0.92
InitMethod · 0.65
WithPortsMethod · 0.65
RunnableMethod · 0.65
optStruct · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…