Documentation ¶
Index ¶
- Constants
- Variables
- func FindElasticSearch(ctx servicehub.Context, required bool) (elasticsearch.Interface, error)
- func FindElection(ctx servicehub.Context, required bool) (election.Interface, error)
- func FindService(ctx servicehub.Context, service string) (interface{}, string)
- func NormalizeKey(s string) string
- type MatchResult
- type Pattern
- type PatternSegment
- type PatternSegmentType
Constants ¶
View Source
const ( // IndexVarNone . IndexVarNone = "" // IndexVarNumber . IndexVarNumber = "number" // IndexVarTimestamp . IndexVarTimestamp = "timestamp" )
View Source
const InvalidPatternValueChars = "-."
InvalidPatternValueChars
Variables ¶
View Source
var ErrKeyLength = errors.New("invalid keys length")
ErrKeyLength .
View Source
var ErrVarLength = errors.New("invalid vars length")
ErrVarLength
Functions ¶
func FindElasticSearch ¶
func FindElasticSearch(ctx servicehub.Context, required bool) (elasticsearch.Interface, error)
FindElasticSearch .
func FindElection ¶
FindElection .
func FindService ¶
func FindService(ctx servicehub.Context, service string) (interface{}, string)
FindService .
Types ¶
type MatchResult ¶
MatchResult .
type Pattern ¶
type Pattern struct { Pattern string Segments []*PatternSegment Keys []string KeyNum int Vars []string VarNum int }
Pattern
type PatternSegment ¶
type PatternSegment struct { Type PatternSegmentType Name string }
PatternSegment .
type PatternSegmentType ¶
type PatternSegmentType uint8
PatternSegmentType .
const ( PatternSegmentStatic PatternSegmentType = iota PatternSegmentKey PatternSegmentVar )
PatternSegmentType values
Click to show internal directories.
Click to hide internal directories.