clusterselector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package clusterselector implements the routing of cluster messages.

Index

Constants

View Source
const (
	// SelectorPatternDelimiter defines the delimiter of routing rules.
	SelectorPatternDelimiter = ","
)

Variables

This section is empty.

Functions

func ClustersToSelector

func ClustersToSelector(clusters *[]string) string

ClustersToSelector combines given clusters to routing rule.

Types

type Selector

type Selector interface {
	// Has determines whether the name matchs the rules.
	Has(string) bool
}

Selector is the interface of cluster selector.

func NewSelector

func NewSelector(s string) Selector

NewSelector returns a new selector object with given routing rules.

Jump to

Keyboard shortcuts

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