transport

package
v0.0.0-...-b43db2c Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: LGPL-3.0 Imports: 14 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 (*HTTP) Call

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

func (*HTTP) Close

func (h *HTTP) Close() 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)

func NewTransportWithHeaders

func NewTransportWithHeaders(url string, headers map[string]string) (Transport, error)

Jump to

Keyboard shortcuts

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