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:
TODO Document gRPC API like hcwallet once the API is stable
Index ¶
Constants ¶
View Source
const ( // The most probable reason for a command timing out would be because a // deadlock has occurred in the main process. We want to reply with an // error message in this case before hcstakepool applies a client timeout. // The commands are basic map operations and copies and typically complete // within one millisecond. It is possible for an abnormally long garbage // collection cycle to also trigger a timeout but the current allocation // pattern of stakepoold is not known to cause such conditions at this time. GRPCCommandTimeout = time.Millisecond * 100 )
Public API version constants
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func StartStakepooldService ¶
func StartStakepooldService(grpcCommandQueueChan chan *GRPCCommandQueue, server *grpc.Server)
StartStakepooldService creates an implementation of the StakepooldService and registers it.
func StartVersionService ¶
StartVersionService creates an implementation of the VersionService and registers it with the gRPC server.
Types ¶
type CommandName ¶
type CommandName int
CommandName maps function names to an integer.
const ( GetAddedLowFeeTickets CommandName = iota GetIgnoredLowFeeTickets GetLiveTickets SetAddedLowFeeTickets SetUserVotingPrefs )
func (CommandName) String ¶
func (s CommandName) String() string
type GRPCCommandQueue ¶
type GRPCCommandQueue struct { Command CommandName RequestTicketData map[chainhash.Hash]string RequestUserData map[string]userdata.UserVotingConfig ResponseEmptyChan chan struct{} ResponseTicketsMSAChan chan map[chainhash.Hash]string }
Click to show internal directories.
Click to hide internal directories.