client

package
v0.0.0-...-9a20c28 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceName  = "luke-service" // Name of service.
	ServiceProxy = "envoy"        // TODO 服务发现, 注册代理 ???

)

Service information constants

Variables

This section is empty.

Functions

func NewTracer

func NewTracer(log Logger) (otg.Tracer, io.Closer)

Types

type Logger

type Logger interface {
	// Error logs a message at error priority
	Error(msg string)

	// Infof logs a message at info priority
	Infof(msg string, args ...interface{})
}

type Luke

type Luke struct {
	transport.Set
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Luke

New init client

func (*Luke) WrapEndpoints

func (l *Luke) WrapEndpoints(in transport.Set) transport.Set

type Option

type Option struct {
	AccessToken string
	Region      string
	Env         string
	Scheme      string
	Addr        string
	Log         Logger
}

func (*Option) GetRequestMetadata

func (o *Option) GetRequestMetadata(_ context.Context, _ ...string) (map[string]string, error)

func (*Option) Init

func (o *Option) Init()

func (*Option) MergeIn

func (o *Option) MergeIn(options ...Option)

func (*Option) RequireTransportSecurity

func (o *Option) RequireTransportSecurity() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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