rpcx

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStreamClientInterceptors

func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption

func WithUnaryClientInterceptors

func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption

Types

type Client

type Client interface {
	Next() (*grpc.ClientConn, bool)
}

type ClientOption

type ClientOption func(options *ClientOptions)

func WithDialOption

func WithDialOption(opt grpc.DialOption) ClientOption

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

type ClientOptions

type ClientOptions struct {
	Timeout     time.Duration
	DialOptions []grpc.DialOption
}

type DirectClient

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

func NewDirectClient

func NewDirectClient(host string, timeout int64, opts ...ClientOption) (*DirectClient, error)

@desc 初始化客户端 @auth liuguoqiang 2020-04-21 @param @return

func (*DirectClient) Next

func (c *DirectClient) Next() (*grpc.ClientConn, bool)

@desc 返回grpc链接 @auth liuguoqiang 2020-04-21 @param @return

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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