client

package
v0.0.0-...-2617f14 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = options{
	// contains filtered or unexported fields
}

Functions

func UnaryClient

func UnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption

Types

type BuildTargetFunc

type BuildTargetFunc func(args ...string) string

type Client

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

func NewClient

func NewClient(opts ...OptionFunc) *Client

func (*Client) AddCallOptions

func (c *Client) AddCallOptions(opts ...grpc.CallOption)

AddOptions

func (*Client) AddOptions

func (c *Client) AddOptions(opts ...OptionFunc)

AddOptions

func (*Client) Client

func (c *Client) Client(serverName string) (grpc.ClientConnInterface, error)

Client

func (*Client) Invoke

func (c *Client) Invoke(ctx context.Context, method string, req, reply interface{}, cc grpc.ClientConnInterface, opts ...grpc.CallOption) error

type OptionFunc

type OptionFunc func(*options)

func WithBalancer

func WithBalancer(name string) OptionFunc

func WithBuildTargetFunc

func WithBuildTargetFunc(buildTargetFunc BuildTargetFunc) OptionFunc

func WithCallWrappers

func WithCallWrappers(wraps ...wrapper.CallWrapper) OptionFunc

func WithCtx

func WithCtx(ctx context.Context) OptionFunc

func WithGrpcDialOption

func WithGrpcDialOption(opts ...grpc.DialOption) OptionFunc

func WithName

func WithName(name string) OptionFunc

func WithNamespace

func WithNamespace(namespace string) OptionFunc

func WithRegistry

func WithRegistry(r registry.Registry) OptionFunc

func WithTimeout

func WithTimeout(timeout time.Duration) OptionFunc

Jump to

Keyboard shortcuts

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