hint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(hType Type, hints []*Hint) bool

Types

type Hint

type Hint struct {
	Type   Type
	Inputs []KeyValue
}

Hint represents a Hint, a valid Hint should include type and input kv pairs.

Follow the format below:

  • without inputs: YOUR_HINT()
  • with non-keyed inputs: YOUR_HINT(foo,bar,quz)
  • with keyed inputs: YOUR_HINT(x=foo,y=bar,z=quz)

func Parse

func Parse(s string) (*Hint, error)

Parse parses Hint from an input string.

func (Hint) String

func (h Hint) String() string

String returns the display string.

type KeyValue

type KeyValue struct {
	K string // key (optional)
	V string // value
}

KeyValue represents a pair of key and value.

type Type

type Type uint8

Type represents the type of Hint.

const (
	TypeMaster   Type // force route to master node
	TypeSlave         // force route to slave node
	TypeRoute         // custom route
	TypeFullScan      // enable full-scan
	TypeDirect        // direct route
	TypeTrace         // distributed tracing
)

func (Type) String

func (tp Type) String() string

String returns the display string.

Jump to

Keyboard shortcuts

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