client

package
v0.0.0-...-c4dba0f Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 14 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) (*cli.OneClient, error)

Build 建立Discovery

func (*Builder) RegisterBuilder

func (b *Builder) RegisterBuilder(builder resolver.Builder)

RegisterBuilder 注册构建器

type Client

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

func NewClient

func NewClient(cli *cli.OneClient) *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 获取RPCX客户端

type Options

type Options struct {
	PoolSize   int
	CertFile   string
	ServerName string
	Discovery  registry.Discovery
	FailMode   cli.FailMode
}

Jump to

Keyboard shortcuts

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