server

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB                   db.Config        `yaml:"db"`
	Port                 int              `yaml:"port"`
	Committee            committee.Config `yaml:"committee"`
	SelfStakingThreshold string           `yaml:"selfStakingThreshold"`
	ScoreThreshold       string           `yaml:"scoreThreshold"`
	EnableVoteSync       bool             `yaml:"enableVoteSync"`
	VoteSync             votesync.Config  `yaml:"voteSync"`
}

Config defines the config for server

type Server

type Server interface {
	api.APIServiceServer
	Start(context.Context) error
	Stop(context.Context) error
}

Server defines the interface of the ranking server implementation

func NewServer

func NewServer(cfg *Config) (Server, error)

NewServer returns an implementation of ranking server

Jump to

Keyboard shortcuts

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