client

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInputPointer = errors.New("the func must take a pointer as an input")
View Source
var ErrInvalidInput = errors.New("func must have 1 input")
View Source
var ErrMustBeFunc = errors.New("value must be a function")

Functions

This section is empty.

Types

type CallError

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

func (*CallError) Error

func (c *CallError) Error() string

type CallOption

type CallOption func(*CallOptions)

func Context

func Context(c context.Context) CallOption

Context sets the context to be used for a call. Defaults to context.Background()

type CallOptions

type CallOptions struct {
	Context context.Context
}

CallOptions represents configuration that apply to a single call

type Client

type Client interface {
	Call(service string, path string, req interface{}, resp interface{}, opts ...CallOption) error
	Subscribe(topic string, callback interface{})
}

func NewClient

func NewClient(opts *options.Options) Client

Jump to

Keyboard shortcuts

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