grpc

package
v3.3.8 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 25 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
	Debug                     bool
	DisableTraceInterceptor   bool
	DisableAidInterceptor     bool
	DisableTimeoutInterceptor bool
	DisableMetricInterceptor  bool
	DisableAccessInterceptor  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) SetDebug added in v3.2.27

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

SetDebug ...

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) SetDisableAccessInterceptor added in v3.2.27

func (config *Config) SetDisableAccessInterceptor(DisableAccessInterceptor bool) *Config

SetDisableAccessInterceptor ...

func (*Config) SetDisableAidInterceptor added in v3.2.27

func (config *Config) SetDisableAidInterceptor(DisableAidInterceptor bool) *Config

SetDisableAidInterceptor ...

func (*Config) SetDisableMetricInterceptor added in v3.2.27

func (config *Config) SetDisableMetricInterceptor(DisableMetricInterceptor bool) *Config

SetDisableMetricInterceptor ...

func (*Config) SetDisableTimeoutInterceptor added in v3.2.27

func (config *Config) SetDisableTimeoutInterceptor(DisableTimeoutInterceptor bool) *Config

SetDisableTimeoutInterceptor ...

func (*Config) SetDisableTraceInterceptor added in v3.2.27

func (config *Config) SetDisableTraceInterceptor(DisableTraceInterceptor bool) *Config

SetDisableTraceInterceptor ...

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