poolintegrator

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: ISC Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPort that the pool integrator runs on
	DefaultPort = 9872
)

Variables

View Source
var (
	// ErrHelpRequested is an error returned when the command line options
	// requested the help information
	ErrHelpRequested = errors.New("help requested")

	// ErrVersionRequested is the error returned when the version command line
	// option was requested
	ErrVersionRequested = fmt.Errorf("version requested")
)

Functions

This section is empty.

Types

type Client

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

Client represents a client to a poolintegrator daemon (ie, the part that runs on the matcher service)

func NewClient

func NewClient(host, cert string) (*Client, error)

NewClient creates a new client connection

func (*Client) ValidatePoolSubsidyAddress

func (c *Client) ValidatePoolSubsidyAddress(poolAddr dcrutil.Address) error

ValidatePoolSubsidyAddress fulfills matcher.PoolAddressValidationProvider

func (*Client) ValidateVoteAddress

func (c *Client) ValidateVoteAddress(voteAddr dcrutil.Address) error

ValidateVoteAddress fulfills matcher.VoteAddressValidationProvider

type Config

type Config struct {
	Port         int `long:"port" description:"Port to run the service on"`
	LogLevel     slog.Level
	LogLevelName string `long:"loglevel" description:"Log Level (CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG)"`
	LogDir       string `long:"logdir" description:"Log directory. Specify to save log messages to a file"`
	KeyFile      string `long:"keyfile" description:"Location of the rpc.key file (private key for the TLS certificate)."`
	CertFile     string `long:"certfile" description:"Location of the rpc.cert file (TLS certificate)."`
	ShowVersion  bool   `long:"version" description:"Show version and quit"`

	TestNet bool `long:"testnet" description:"Whether to run on testnet"`

	StakepooldConfigFile string `` /* 138-byte string literal not displayed */

	DcrwHost string `long:"dcrwhost" description:"Address of the dcrwallet daemon"`
	DcrwUser string `long:"dcrwuser" description:"Username of the rpc connection to dcrwallet"`
	DcrwPass string `long:"dcrwpass" description:"Password of the rpc connection to dcrwallet"`
	DcrwCert string `long:"dcrwcert" descript}ion:"Location of the rpc.cert file of dcrwallet"`

	PoolSubsidyWalletMasterPub string `` /* 246-byte string literal not displayed */
}

Config holds information on how to configure the voting pool integrator daemon.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads configuration for a pool integrator daemon from the filesystem and passed command line args

type Daemon

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

Daemon is the structure that defines a pool integrator daemon.

func NewDaemon

func NewDaemon(cfg *Config) (*Daemon, error)

NewDaemon initializes a new pool integrator daemon

func (*Daemon) ListenAndServe

func (d *Daemon) ListenAndServe() error

ListenAndServe blocks execution by opening the appropriate listening sockets and responding to integration requests

func (*Daemon) ValidatePoolSubsidyAddress

ValidatePoolSubsidyAddress fullfill grpc service requirements

func (*Daemon) ValidateVoteAddress

func (d *Daemon) ValidateVoteAddress(ctx context.Context, req *pb.ValidateVoteAddressRequest) (
	*pb.ValidateVoteAddressResponse, error)

ValidateVoteAddress fullfill grpc service requirements

Jump to

Keyboard shortcuts

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