daemon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallJSONRPC

func CallJSONRPC(method string, params interface{}) ([]byte, error)

CallJSONRPC call /json_rpc func curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block","params":{"height":912345}}' -H 'Content-Type: application/json'

func InitDaemonClient

func InitDaemonClient(daemonConfig *config.DaemonConfig)

Types

type DaemonClient

type DaemonClient struct {
	Addr  string
	Login string

	Trusted bool
	Testnet bool

	HttpClient *http.Client
}

type HttpMethod

type HttpMethod string
const (
	GET  HttpMethod = "GET"
	POST HttpMethod = "POST"
)

Jump to

Keyboard shortcuts

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