Back to godoc.org

Package decorator

v1.0.1
Latest Go to latest

The latest major version is .

Published: Mar 15, 2020 | License: Apache-2.0 | Module: github.com/LinuxGit/tidb-dashboard

Overview

Package decorator contains all implementations of LabelStrategy.

Index

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.

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