egrpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 22 Imported by: 10

Documentation

Index

Constants

View Source
const PackageName = "client.egrpc"

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	*grpc.ClientConn
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Name         string // config's name
	BalancerName string
	Address      string
	Block        bool
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	Direct       bool
	OnDialError  string // panic | error
	KeepAlive    *keepalive.ClientParameters

	SlowLogThreshold time.Duration

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

type Container

type Container struct {
	// contains filtered or unexported fields
}

func DefaultContainer

func DefaultContainer() *Container

func Load

func Load(key string) *Container

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

Build ...

type Option

type Option func(c *Container)

func WithDialOption

func WithDialOption(opts ...grpc.DialOption) Option

WithDialOption ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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