rpc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(backend *logger.Backend, level logger.Level)

UseLogger uses a specified Logger to output package logging info.

func ValidateRPCConfig

func ValidateRPCConfig(config *Config) error

ValidateRPCConfig makes sure that provided Config is valid or returns an error otherwise

Types

type Client

type Client struct {
	*rpcclient.RPCClient
	OnBlockAdded chan struct{}
}

Client wraps rpcclient.RPCClient with extra functionality needed for stability-tests

func ConnectToRPC

func ConnectToRPC(config *Config, dagParams *dagconfig.Params) (*Client, error)

ConnectToRPC connects to JSON-RPC server specified in the provided config

func (*Client) RegisterForBlockAddedNotifications

func (c *Client) RegisterForBlockAddedNotifications() error

RegisterForBlockAddedNotifications registers for block added notifications pushed by the node

type Config

type Config struct {
	RPCServer string `short:"s" long:"rpcserver" description:"RPC server to connect to"`
}

Config are configurations common to all tests that need to connect to json-rpc

Jump to

Keyboard shortcuts

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