client

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(logger log.Logger) request.Middleware

func Metrics

func Metrics(storage MetricStorage) request.Middleware

func RequestId

func RequestId() request.Middleware

Types

type Client

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

func Default

func Default(restMiddlewares ...request.Middleware) (*Client, error)

func New

func New(initialHosts []string, opts ...Option) (*Client, error)

func (*Client) BackendClient

func (cli *Client) BackendClient() isp.BackendServiceClient

func (*Client) Close

func (cli *Client) Close() error

func (*Client) Invoke

func (cli *Client) Invoke(endpoint string) *request.Builder

func (*Client) Upgrade

func (cli *Client) Upgrade(hosts []string)

type MetricStorage

type MetricStorage interface {
	ObserveDuration(endpoint string, duration time.Duration)
}

type Option

type Option func(cli *Client)

func WithDialOptions

func WithDialOptions(dialOptions ...grpc.DialOption) Option

func WithMiddlewares

func WithMiddlewares(middlewares ...request.Middleware) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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