client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

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

func (*BaseClient) Call

func (b *BaseClient) Call(ctx *light.Context, serviceMethod string, request interface{}, response interface{}) (err error)

func (*BaseClient) Error added in v0.0.3

func (b *BaseClient) Error() error

type Client

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

func NewClient

func NewClient(discover discovery.Discovery, options ...Option) *Client

func (*Client) NewConnect

func (c *Client) NewConnect(serverName string) (conn *Connect, err error)

type Connect

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

func (*Connect) Call

func (c *Connect) Call(ctx *light.Context, serviceMethod string, request interface{}, response interface{}) error

func (*Connect) Close

func (c *Connect) Close()

type LightClient

type LightClient interface {
	Call(ctx *light.Context, serviceMethod string, request interface{}, response interface{}) error
	Error() error
}

type Option

type Option func(options *Options)

func SetAUTH

func SetAUTH(token string) Option

func SetCompressor

func SetCompressor(compressor codes.CompressorType) Option

func SetHeartBeat

func SetHeartBeat(heartBeat time.Duration) Option

func SetLoadBalancing

func SetLoadBalancing(lb load_banlancing.LoadBalancing) Option

func SetPoolSize

func SetPoolSize(p int) Option

func SetRASPublicKey added in v0.0.3

func SetRASPublicKey(key []byte) Option

func SetSerialization

func SetSerialization(serialization codes.SerializationType) Option

func SetTimeOut

func SetTimeOut(writeTimeout time.Duration, readTimeout time.Duration) Option

func Trance

func Trance() Option

type Options

type Options struct {
	Discovery discovery.Discovery

	Trace bool
	AUTH  string
	// contains filtered or unexported fields
}

type Payload

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

Jump to

Keyboard shortcuts

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