transport

package
v0.0.0-...-c30ab82 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = fmt.Errorf("timeout")

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Read([]byte) ([]byte, error)
	Write([]byte) error
	Close() error
}

type HTTP

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

func NewHTTP

func NewHTTP(addr, proxy string) *HTTP

func (*HTTP) Call

func (h *HTTP) Call(method string, out interface{}, params ...interface{}) error

func (*HTTP) Close

func (h *HTTP) Close() error

func (*HTTP) Do

func (h *HTTP) Do(req *fasthttp.Request, res *fasthttp.Response) ([]byte, error)

type PubSubTransport

type PubSubTransport interface {
	Subscribe(method string, callback func(b []byte)) (func() error, error)
}

type Transport

type Transport interface {
	Call(method string, out interface{}, params ...interface{}) error
	Close() error
}

func NewTransport

func NewTransport(url, proxy string) (Transport, error)

Jump to

Keyboard shortcuts

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