Back to

Package decorator

Latest Go to latest

The latest major version is .

Published: Mar 15, 2020 | License: Apache-2.0 | Module:


Package decorator contains all implementations of LabelStrategy.


type LabelKey

type LabelKey struct {
	Key    string   `json:"key" binding:"required"`
	Labels []string `json:"labels" binding:"required"`

LabelKey is the decoration key.

type LabelStrategy

type LabelStrategy interface {
	CrossBorder(startKey, endKey string) bool
	Label(key string) LabelKey

LabelStrategy requires cross-border determination and key decoration scheme.

func TiDBLabelStrategy

func TiDBLabelStrategy(ctx context.Context, cfg *config.Config, provider *region.PDDataProvider, httpClient *http.Client) LabelStrategy

TiDBLabelStrategy implements the LabelStrategy interface. Get Label Information from TiDB.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier