matchers

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

matchers

-- import "github.com/Clever/sphinx/matchers"

Usage

type Matcher
type Matcher interface {
	Match(common.Request) bool
}

A Matcher determines if a common.Request matches its requirements.

type MatcherFactory
type MatcherFactory interface {
	Type() string
	Create(config interface{}) (Matcher, error)
}

A MatcherFactory creates a Matcher based on a config.

func MatcherFactoryFinder
func MatcherFactoryFinder(name string) MatcherFactory

MatcherFactoryFinder finds a MatcherFactory by name.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher interface {
	Match(common.Request) bool
}

A Matcher determines if a common.Request matches its requirements.

type MatcherFactory

type MatcherFactory interface {
	Type() string
	Create(config interface{}) (Matcher, error)
}

A MatcherFactory creates a Matcher based on a config.

func MatcherFactoryFinder

func MatcherFactoryFinder(name string) MatcherFactory

MatcherFactoryFinder finds a MatcherFactory by name.

Jump to

Keyboard shortcuts

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