guidance

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGroup

func NewGroup(memo *memo.Memo, engine loadbalance.LoadBalancer, opts ...Option)

NewGroup will not return a group pointer, use GetGroup function directly

Types

type Group

type Group struct {
	// contains filtered or unexported fields
}

func GetGroup

func GetGroup(name string) *Group

GetGroup return correspond group related to the name

func (*Group) Get

func (g *Group) Get(ctx context.Context, key string) (memo.ByteView, error)

Get guidance where to get value

func (*Group) Name

func (g *Group) Name() string

Name return group name

type Option

type Option func(o *Options)

func WithGetter

func WithGetter(getter source.Getter) Option

WithGetter define backend datasource

func WithGroupName

func WithGroupName(name string) Option

WithGroupName define name for group

func WithThrift1

func WithThrift1() Option

WithThrift1 must be consistent will app.WithThrift0

type Options

type Options struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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