consulsearch

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultSearcher

type DefaultSearcher[C consul.Client, M common.Matcher] struct {
	Client     consul.Client
	Comparator common.Matcher
}

func (*DefaultSearcher[CC, Matcher]) Search

func (s *DefaultSearcher[CC, Matcher]) Search(i *Input) (*Output, error)

type Input

type Input struct {
	// base path to start search from
	BasePath string
	// the value to match search against
	Value string
	// TODO: implement search keys content
	SearchKeysContent bool
}

func NewSearchInput

func NewSearchInput(value string, basePath string) *Input

type Output

type Output struct {
	Matches []string
}

type Searcher

type Searcher[C consul.Client, M common.Matcher] interface {
	Search(i *Input) (*Output, error)
}

Jump to

Keyboard shortcuts

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