Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMatchers ¶
func NewMatchers(ctx context.Context, client *http.Client, opts ...MatchersOption) ([]driver.Matcher, error)
NewMatchers will return a slice of Matcher created based on the provided MatchersOption.
Types ¶
type Configs ¶
type Configs map[string]driver.MatcherConfigUnmarshaler
type MatchersOption ¶
type MatchersOption func(m *Matchers)
func WithConfigs ¶
func WithConfigs(cfgs Configs) MatchersOption
WithConfigs tells the Matchers to configure each matcher where a configuration is provided.
Configuration of individual matchers is delegated to matchers/registry/registry.go Note: this option is optimal when ran after WithEnabled option. However, this option has no strict depedency on others.
func WithEnabled ¶
func WithEnabled(enabled []string) MatchersOption
WithEnabled configures the Matchers to only run the specified matchers.
If enabled == nil all default matchers will run (same as not providing this option to the constructor at all). If len(enabled) == 0 no default matchers will run. If len(enabled) > 0 only provided matchers will be ran.
func WithOutOfTree ¶
func WithOutOfTree(outOfTree []driver.Matcher) MatchersOption
WithOutOfTree allows callers to provide their own out-of-tree matchers.
Directories ¶
Path | Synopsis |
---|---|
Importing this package registers default matchers via its init function.
|
Importing this package registers default matchers via its init function. |
Package matchers holds a registry of default matchers.
|
Package matchers holds a registry of default matchers. |