client

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Init(...Option) error
	Options() Options
	String() string
}

Client is the interface used to make requests to services. It supports Request/Response via Transport and Publishing via the Broker. It also supports bidirectional streaming of requests.

var (
	// DefaultClient is a default client to use out of the box
	DefaultClient Client = newGinClient()
)

type Option

type Option func(*Options)

type Options

type Options struct {
	Network      string
	Addr         string
	Timeout      string
	ReadTimeout  string
	WriteTimeout string

	On   bool      // pref switch
	Once sync.Once // do once

	//
	//
	//
	Metadata map[string]string
	Name     string
	Id       string
	Version  string

	// Other options for implementations of the interface
	// can be stored in a context
	Context context.Context
}

func NewOptions

func NewOptions(options ...Option) Options

Jump to

Keyboard shortcuts

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