remote

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	RPC  *RPCConfig  `yaml:"rpc"`
	REST *RESTConfig `yaml:"rest"`
}

Details represents a node details for a remote node

func DefaultDetails

func DefaultDetails() *Details

func NewDetails

func NewDetails(rpc *RPCConfig, rest *RESTConfig) *Details

func (*Details) Validate

func (d *Details) Validate() error

Validate implements node.Details

type RESTConfig

type RESTConfig struct {
	Address string `yaml:"address"`
}

RESTConfig contains the configuration for the REST endpoint

func DefaultRESTConfig

func DefaultRESTConfig() *RESTConfig

DefaultRESTConfig returns the default instance of RESTConfig

func NewRESTConfig

func NewRESTConfig(address string) *RESTConfig

NewRESTConfig allows to build a new RESTConfig instance

type RPCConfig

type RPCConfig struct {
	ClientName     string `yaml:"client_name"`
	Address        string `yaml:"address"`
	MaxConnections int    `yaml:"max_connections"`
}

RPCConfig contains the configuration for the RPC endpoint

func DefaultRPCConfig

func DefaultRPCConfig() *RPCConfig

DefaultRPCConfig returns the default instance of RPCConfig

func NewRPCConfig

func NewRPCConfig(clientName, address string, maxConnections int) *RPCConfig

NewRPCConfig allows to build a new RPCConfig instance

Jump to

Keyboard shortcuts

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