client

package
v2.0.0-...-44dd1c6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(opts *Options) *Builder

func (*Builder) Build

func (b *Builder) Build(target string) (*grpc.ClientConn, error)

Build 构建连接

type Client

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

func NewClient

func NewClient(cc *grpc.ClientConn) *Client

func (*Client) Call

func (c *Client) Call(ctx context.Context, service, method string, args interface{}, reply interface{}, opts ...interface{}) error

Call 调用服务方法

func (*Client) Client

func (c *Client) Client() interface{}

Client 获取GRPC客户端

type Options

type Options struct {
	CertFile   string
	ServerName string
	Discovery  registry.Discovery
	DialOpts   []grpc.DialOption
}

Jump to

Keyboard shortcuts

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