decorator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package decorator contains all implementations of LabelStrategy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 {
	Background()
	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.

Jump to

Keyboard shortcuts

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