grpcclient

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Conn

func (client *Client) Conn() *grpc.ClientConn

func (*Client) Name

func (client *Client) Name() string

func (*Client) Serve

func (client *Client) Serve(ctx context.Context) error

func (*Client) Shutdown

func (client *Client) Shutdown(ctx context.Context) error

type Config

type Config struct {
	Dial   bool   `config:"dial" desc:"dial when build new client."`
	Target string `config:"target" desc:"target server."`
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig(key string) *Config

func StdConfig

func StdConfig(key string, optionFunc ...OptionFunc) *Config

func (*Config) Build

func (c *Config) Build() *Client

func (*Config) Path

func (c *Config) Path() string

type OptionFunc

type OptionFunc func(*Config)

func WithDialOption

func WithDialOption(opt ...grpc.DialOption) OptionFunc

func WithStreamClientInterceptor

func WithStreamClientInterceptor(interceptor ...grpc.StreamClientInterceptor) OptionFunc

func WithUnaryClientInterceptor

func WithUnaryClientInterceptor(interceptor ...grpc.UnaryClientInterceptor) OptionFunc

Jump to

Keyboard shortcuts

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