Documentation ¶
Index ¶
- func SetupConfig(cfg *Config)
- type Config
- type Genesis
- type RoundConfig
- func (c RoundConfig) MarshalLogObject(enc zapcore.ObjectEncoder) error
- func (c *RoundConfig) OpenRoundId(genesis, when time.Time) uint
- func (c *RoundConfig) RoundDuration() time.Duration
- func (c *RoundConfig) RoundEnd(genesis time.Time, epoch uint) time.Time
- func (c *RoundConfig) RoundStart(genesis time.Time, epoch uint) time.Time
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupConfig ¶ added in v0.9.2
func SetupConfig(cfg *Config)
SetupConfig adjusts the paths in the config to be relative to the poetdir.
Types ¶
type Config ¶ added in v0.9.2
type Config struct { Genesis Genesis `long:"genesis-time" description:"Genesis timestamp in RFC3339 format"` PoetDir string `long:"poetdir" description:"The base directory that contains poet's data, logs, configuration file, etc."` ConfigFile string `` /* 126-byte string literal not displayed */ DataDir string `` /* 126-byte string literal not displayed */ DbDir string `long:"dbdir" description:"The directory to store DBs within"` LogDir string `long:"logdir" description:"Directory to log output."` DebugLog bool `long:"debuglog" description:"Enable debug logs"` JSONLog bool `long:"jsonlog" description:"Whether to log in JSON format"` MaxLogFiles int `long:"maxlogfiles" description:"Maximum logfiles to keep (0 for no rotation)"` MaxLogFileSize int `long:"maxlogfilesize" description:"Maximum logfile size in MB"` RawRPCListener string `` /* 126-byte string literal not displayed */ RawRESTListener string `` /* 126-byte string literal not displayed */ MetricsPort *uint16 `long:"metrics-port" description:"The port to expose metrics"` MaxGrpcRespSize int `long:"max-grpc-resp-size" description:"Maximum size of GRPC response in bytes"` CPUProfile string `long:"cpuprofile" description:"Write CPU profile to the specified file"` Profile string `long:"profile" description:"Enable HTTP profiling on given port -- must be between 1024 and 65535"` Round *RoundConfig `group:"Round"` Registration registration.Config `group:"Registration"` Service service.Config `group:"Service"` DisableWorker bool `long:"disable-worker" description:"Whether to disable worker service for PoSW"` }
func DefaultConfig ¶ added in v0.9.2
func DefaultConfig() *Config
DefaultConfig returns a config with default hardcoded values.
func ParseFlags ¶ added in v0.9.2
ParseFlags reads values from command line arguments.
func ReadConfigFile ¶ added in v0.9.2
ReadConfigFile reads config from an ini file. It uses the provided `cfg` as a base config and overrides it with the values from the config file.
type Genesis ¶ added in v0.9.2
func (*Genesis) UnmarshalFlag ¶ added in v0.9.2
UnmarshalFlag implements flags.Unmarshaler.
type RoundConfig ¶ added in v0.9.2
type RoundConfig struct { EpochDuration time.Duration `long:"epoch-duration" description:"Epoch duration"` PhaseShift time.Duration `long:"phase-shift"` CycleGap time.Duration `long:"cycle-gap"` }
func DefaultRoundConfig ¶ added in v0.9.2
func DefaultRoundConfig() *RoundConfig
func (RoundConfig) MarshalLogObject ¶ added in v0.9.2
func (c RoundConfig) MarshalLogObject(enc zapcore.ObjectEncoder) error
implement zap.ObjectMarshaler interface.
func (*RoundConfig) OpenRoundId ¶ added in v0.9.2
func (c *RoundConfig) OpenRoundId(genesis, when time.Time) uint
Calculate ID of the open round at a given point in time.
func (*RoundConfig) RoundDuration ¶ added in v0.9.2
func (c *RoundConfig) RoundDuration() time.Duration
func (*RoundConfig) RoundStart ¶ added in v0.9.2
type Server ¶ added in v0.4.0
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GrpcAddr ¶ added in v0.6.4
GrpcAddr returns the address that server is listening on for GRPC.
func (*Server) GrpcRestProxyAddr ¶ added in v0.6.4
GrpcRestProxyAddr returns the address that REST-GRPC proxy is listening on.
Click to show internal directories.
Click to hide internal directories.