rpcxclient

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: GPL-3.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultOptions = &Options{
		Breaker: func() client.Breaker {
			return client.NewConsecCircuitBreaker(3, 30*time.Second)
		},
	}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	XClient client.XClient
	Options *Options
}

func NewClient

func NewClient(options *Options) (c *Client, err error)

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, request interface{}, response interface{}) (err error)

type Options

type Options struct {
	RegistryOption RegistryOption
	Timeout        time.Duration
	Breaker        func() client.Breaker
}

type RegistryOption

type RegistryOption struct {
	BasePath   string
	ServerName string
	Addr       []string
	Group      string
}

Jump to

Keyboard shortcuts

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