matchers

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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 Matchers

type Matchers struct {
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL