jsonrpc

package
v0.0.0-...-9e8562e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: ISC Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlashSendPairs

func FlashSendPairs(w *wallet.Wallet, amounts map[string]ucutil.Amount, account uint32, minconf int32, payLoad []byte) (string, error)

sendPairs creates and sends payment transactions. It returns the transaction hash in string format upon success All errors are returned in ucjson.RPCError format

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger sets the package-wide logger. Any calls to this function must be made before a server is created and used (it is not concurrent safe).

Types

type Options

type Options struct {
	Username string
	Password string

	MaxPOSTClients      int64
	MaxWebsocketClients int64
}

Options contains the required options for running the legacy RPC server.

type Server

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

Server holds the items the RPC server may need to access (auth, config, shutdown, etc.)

func NewServer

func NewServer(opts *Options, activeNet *chaincfg.Params, walletLoader *loader.Loader, listeners []net.Listener) *Server

NewServer creates a new server for serving legacy RPC client connections, both HTTP POST and websocket.

func (*Server) RequestProcessShutdown

func (s *Server) RequestProcessShutdown() <-chan struct{}

RequestProcessShutdown returns a channel that is sent to when an authorized client requests remote shutdown.

func (*Server) Stop

func (s *Server) Stop()

Stop gracefully shuts down the rpc server by stopping and disconnecting all clients. This blocks until shutdown completes.

Directories

Path Synopsis
Package types implements concrete types for the ucwallet JSON-RPC API.
Package types implements concrete types for the ucwallet JSON-RPC API.

Jump to

Keyboard shortcuts

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