wsrpc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WSProvider

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

func New

func New(u string, retry bool) (*WSProvider, error)

New creates a new WSProvider struct

func (*WSProvider) Call

func (p *WSProvider) Call(result interface{}, method string, params ...interface{}) error

Call calls a RPC method and returns coresponding object

func (*WSProvider) CallRaw

func (p *WSProvider) CallRaw(method string, params ...interface{}) ([]byte, error)

CallRaw calls a RPC method and returns the raw result

func (*WSProvider) Start

func (p *WSProvider) Start() error

Start connects to parity and starts listening for notifications

func (*WSProvider) Stop

func (p *WSProvider) Stop()

Stop closes the websocket connection

func (*WSProvider) Subscribe

func (p *WSProvider) Subscribe(receiver chan *json.RawMessage, method string, event string, params ...interface{}) error

Subscribe creates a subscription to event using method

Jump to

Keyboard shortcuts

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