Documentation ¶ Index ¶ type Config type Server func NewServer(cfg *Config) (Server, error) 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"` } 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 Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.