MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithDriver

Function WithDriver

leader/dependency_option.go:14–18  ·  view source on GitHub ↗

WithDriver instructs the Providers to accept a leader election driver different from the default one. This option supersedes the WithDriverConstructor option.

(driver Driver)

Source from the content-addressed store, hash-verified

12// different from the default one. This option supersedes the
13// WithDriverConstructor option.
14func WithDriver(driver Driver) ProvidersOptionFunc {
15 return func(options *providersOption) {
16 options.driver = driver
17 }
18}
19
20// WithDriverConstructor instructs the Providers to accept an alternative constructor for election driver.
21// If the WithDriver option is set, this option becomes an no-op.

Callers 1

Example_providersFunction · 0.92

Calls

no outgoing calls

Tested by 1

Example_providersFunction · 0.74