rpcserver

package
v0.0.0-...-31898ba Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: ISC Imports: 11 Imported by: 0

Documentation

Overview

Package rpcserver implements the RPC API and is used by the main package to start gRPC services.

Full documentation of the API implemented by this package is maintained in a language-agnostic document:

https://github.com/decred/dcrwallet/blob/master/rpc/documentation/api.md

Any API changes must be performed according to the steps listed here:

https://github.com/decred/dcrwallet/blob/master/rpc/documentation/serverchanges.md

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInProgress must be returned when concurrent access is requested.
	ErrInProgress = status.Errorf(codes.Aborted, "operation in progress")

	// ErrBadCookie can be returned to let clients know their session has
	// already expired.
	ErrBadCookie = status.Errorf(codes.InvalidArgument, "bad cookie")

	// ErrTempFailure can be returned to indicate a temporary nature of an
	// error, prompting the client to try again later.
	ErrTempFailure = status.Errorf(codes.Internal, "temporary failure")

	// ErrBadAddress must be returned to indicate that client has supplied
	// an invalid address.
	ErrBadAddress = status.Errorf(codes.InvalidArgument, "bad address")

	// ErrEscrowFailed must be returned to indicate that the resource is
	// unavailable.
	ErrEscrowFailed = status.Errorf(codes.Unavailable, "escrow failed")

	// ErrBadRequest is a vague error message that must be returned during
	// the exchange to obscure which step has actually failed.
	ErrBadRequest = status.Errorf(codes.FailedPrecondition, "bad request")
)

Functions

func RegisterServices

func RegisterServices(server *grpc.Server)

RegisterServices registers implementations of each gRPC service and registers it with the server. Not all service are ready to be used after registration.

func ServiceReady

func ServiceReady(service string) error

ServiceReady returns nil when the service is ready and a gRPC error when not.

func StartTumblerService

func StartTumblerService(server *grpc.Server, tumbler *tumbler.Tumbler)

StartTumblerService starts the TumblerService.

func UseLogger

func UseLogger(l btclog.Logger)

UseLogger sets the logger to use for the gRPC server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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