grpc

package
v0.0.0-...-a89d410 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TraceUnaryClientInterceptor

func TraceUnaryClientInterceptor() grpc.UnaryClientInterceptor

Types

type ClientConn

type ClientConn = grpc.ClientConn

type Config

type Config struct {
	Name           string // config's name
	BalancerName   string
	Addr           string
	DialTimeout    time.Duration
	ReadTimeout    time.Duration
	KeepAlive      *keepalive.ClientParameters
	RegistryConfig string

	SlowThreshold time.Duration

	Debug                      bool
	DisableSentinelInterceptor bool
	DisableTraceInterceptor    bool
	DisableAidInterceptor      bool
	DisableTimeoutInterceptor  bool
	DisableMetricInterceptor   bool
	DisableAccessInterceptor   bool
	AccessInterceptorLevel     string
	// contains filtered or unexported fields
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

func RawConfig

func RawConfig(key string) *Config

RawConfig ...

func StdConfig

func StdConfig(name string) *Config

StdConfig ...

func (*Config) Build

func (config *Config) Build() (*grpc.ClientConn, error)

Build ...

func (*Config) MustBuild

func (config *Config) MustBuild() *grpc.ClientConn

MustBuild panics when error found.

func (*Config) MustSingleton

func (config *Config) MustSingleton() *grpc.ClientConn

MustSingleton panics when error found.

func (*Config) Singleton

func (config *Config) Singleton() (*grpc.ClientConn, error)

Singleton returns a singleton client conn.

func (*Config) WithDialOption

func (config *Config) WithDialOption(opts ...grpc.DialOption) *Config

WithDialOption ...

func (*Config) WithLogger

func (config *Config) WithLogger(logger *xlog.Logger) *Config

WithLogger ...

Directories

Path Synopsis
p2c

Jump to

Keyboard shortcuts

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