grpc

package
v3.8.49 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name         string
	BalancerName string
	Address      string
	Block        bool
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	Direct       bool
	KeepAlive    *keepalive.ClientParameters

	SlowThreshold            time.Duration
	EnableDebug              bool
	EnableTraceInterceptor   bool
	EnableAidInterceptor     bool
	EnableTimeoutInterceptor bool
	EnableMetricInterceptor  bool
	EnableAccessInterceptor  bool
	AccessInterceptorLevel   string
	Etcd                     *etcdv3.Config
	// contains filtered or unexported fields
}

Config ...

func New

func New() *Config

New ...

func (*Config) Build

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

Build ...

func (*Config) MustBuild added in v3.2.29

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

MustBuild ...

func (*Config) MustSingleton added in v3.2.29

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

MustSingleton panics when error found.

func (*Config) SetAccessInterceptorLevel added in v3.2.27

func (config *Config) SetAccessInterceptorLevel(AccessInterceptorLevel string) *Config

SetAccessInterceptorLevel ...

func (*Config) SetAddress added in v3.2.27

func (config *Config) SetAddress(Address string) *Config

SetAddress ...

func (*Config) SetBalancerName added in v3.2.27

func (config *Config) SetBalancerName(BalancerName string) *Config

SetBalancerName ...

func (*Config) SetBlock added in v3.2.27

func (config *Config) SetBlock(Block bool) *Config

SetBlock ...

func (*Config) SetDialTimeout added in v3.2.27

func (config *Config) SetDialTimeout(DialTimeout time.Duration) *Config

SetDialTimeout ...

func (*Config) SetDirect added in v3.2.27

func (config *Config) SetDirect(Direct bool) *Config

SetDirect ...

func (*Config) SetEnableAccessInterceptor added in v3.8.21

func (config *Config) SetEnableAccessInterceptor(EnableAccessInterceptor bool) *Config

SetEnableAccessInterceptor ...

func (*Config) SetEnableAidInterceptor added in v3.8.21

func (config *Config) SetEnableAidInterceptor(EnableAidInterceptor bool) *Config

SetEnableAidInterceptor ...

func (*Config) SetEnableDebug added in v3.8.21

func (config *Config) SetEnableDebug(Debug bool) *Config

SetEnableDebug ...

func (*Config) SetEnableMetricInterceptor added in v3.8.21

func (config *Config) SetEnableMetricInterceptor(EnableMetricInterceptor bool) *Config

SetEnableMetricInterceptor ...

func (*Config) SetEnableTimeoutInterceptor added in v3.8.21

func (config *Config) SetEnableTimeoutInterceptor(EnableTimeoutInterceptor bool) *Config

SetEnableTimeoutInterceptor ...

func (*Config) SetEnableTraceInterceptor added in v3.8.21

func (config *Config) SetEnableTraceInterceptor(EnableTraceInterceptor bool) *Config

SetEnableTraceInterceptor ...

func (*Config) SetEtcd added in v3.2.29

func (config *Config) SetEtcd(option *etcdv3.Config) *Config

func (*Config) SetName added in v3.2.27

func (config *Config) SetName(Name string) *Config

SetName ...

func (*Config) SetReadTimeout added in v3.2.27

func (config *Config) SetReadTimeout(ReadTimeout time.Duration) *Config

SetReadTimeout ...

func (*Config) SetSlowThreshold added in v3.2.27

func (config *Config) SetSlowThreshold(SlowThreshold time.Duration) *Config

SetSlowThreshold ...

func (*Config) Singleton added in v3.2.29

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 ...

Directories

Path Synopsis
p2c

Jump to

Keyboard shortcuts

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