server

package
v0.0.0-...-bc1fc02 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: ISC, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package server 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 eacrwallet 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 dcrstakepool 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(stakepoold *stakepool.Stakepoold, server *grpc.Server)

StartStakepooldService creates an implementation of the StakepooldService and registers it.

func StartVersionService

func StartVersionService(server *grpc.Server)

StartVersionService creates an implementation of the VersionService and registers it with the gRPC server.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using slog.

Types

This section is empty.

Jump to

Keyboard shortcuts

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