impl

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(dbInitOptions ...func(*badger.Options)) (*ldService, error)

NewServer opens and returns a badger.DB facade that implements the proto interface proto.LdServer.

Types

type KvSender

type KvSender interface {
	Send(*pb.KeyValue) error
}

type Matcher

type Matcher interface {
	Match([]byte) bool
}

Matcher is simply an interface that regexp.Regexp fulfill (with the method we care for) This way we can implement another Matcher fulfilling this interface

func NewMatcher

func NewMatcher(pattern string) (Matcher, error)

NewMatcher returns a matcher that is the regexp.Regexp or a function that is always true

type MatcherFunc

type MatcherFunc func([]byte) bool

MatcherFunc is any `func([]byte) bool` acting as a named target for implementation

func (MatcherFunc) Match

func (matcher MatcherFunc) Match(b []byte) bool

Match implements interface Matcher for MatcherFunc, delegating to the underlying function

Jump to

Keyboard shortcuts

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