configure

package
v0.0.0-...-734a412 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRECT    = "direct"
	DISCOVERY = "discovery"
)
View Source
const (
	GRPC = "GRPC"
)

Variables

This section is empty.

Functions

func Init

func Init(dsn *string, clients []*config.Client, _ config.Watcher)

Init 初始化服务

func Middlewares

func Middlewares(conf *config.Client) []middleware.Middleware

Types

type Client

type Client interface {
	Conn(ctx context.Context) (*ggrpc.ClientConn, error)
}

func Get

func Get(name string) Client

type Factory

type Factory func(*config.Client) (Client, error)

Factory is returns service client.

func NewFactory

func NewFactory(r registry.Discovery, opts ...Option) Factory

NewFactory new a client factory.

type Option

type Option func(*options)

func WithPickerBuilder

func WithPickerBuilder(in selector.Builder) Option

Jump to

Keyboard shortcuts

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