providers

package
v0.0.0-...-aff2438 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchRequest

type BatchRequest struct {
	RpcMethods []util.JSONRPCObject
}

func (*BatchRequest) AddRequest

func (br *BatchRequest) AddRequest(method string, params interface{})

func (*BatchRequest) AsJsonString

func (br *BatchRequest) AsJsonString() string

func (*BatchRequest) Length

func (br *BatchRequest) Length() int

type HTTPProvider

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

func NewHTTPProvider

func NewHTTPProvider(address string, timeout int32, secure bool) *HTTPProvider

func NewHTTPProviderWithClient

func NewHTTPProviderWithClient(address string, timeout int32, secure bool, client *http.Client) *HTTPProvider

func (HTTPProvider) BatchSendRequest

func (provider HTTPProvider) BatchSendRequest(batchReq *BatchRequest) ([]dto.RequestResult, error)

func (HTTPProvider) Close

func (provider HTTPProvider) Close() error

func (HTTPProvider) SendRequest

func (provider HTTPProvider) SendRequest(v interface{}, method string, params interface{}) error

type IPCProvider

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

func NewIPCProvider

func NewIPCProvider(endpoint string) *IPCProvider

func (IPCProvider) BatchSendRequest

func (provider IPCProvider) BatchSendRequest(batchReq *BatchRequest) ([]dto.RequestResult, error)

func (IPCProvider) Close

func (provider IPCProvider) Close() error

func (IPCProvider) SendRequest

func (provider IPCProvider) SendRequest(v interface{}, method string, params interface{}) error

type ProviderInterface

type ProviderInterface interface {
	SendRequest(v interface{}, method string, params interface{}) error
	BatchSendRequest(batchReq *BatchRequest) ([]dto.RequestResult, error)
	Close() error
}

type WebSocketProvider

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

func NewWebSocketProvider

func NewWebSocketProvider(address string) *WebSocketProvider

func (WebSocketProvider) BatchSendRequest

func (provider WebSocketProvider) BatchSendRequest(batchReq *BatchRequest) ([]dto.RequestResult, error)

func (WebSocketProvider) Close

func (provider WebSocketProvider) Close() error

func (WebSocketProvider) SendRequest

func (provider WebSocketProvider) SendRequest(v interface{}, method string, params interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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