gonewsctl stub, groups create/delete queries, http server for API.
This commit is contained in:
@@ -4,6 +4,8 @@ package configuration
|
||||
type config struct {
|
||||
// Database represents database configuration.
|
||||
Database Database `yaml:"database"`
|
||||
// HTTP represents HTTP server configuration.
|
||||
HTTP HTTP `yaml:"http"`
|
||||
// Network represents network stack configuration.
|
||||
Network []Network `yaml:"network"`
|
||||
}
|
||||
@@ -20,6 +22,16 @@ type Database struct {
|
||||
Timeout int64 `yaml:"timeout"`
|
||||
}
|
||||
|
||||
type HTTP struct {
|
||||
// Listen is an address in form "ip:port" on which HTTP server
|
||||
// will listen to requests.
|
||||
Listen string `yaml:"listen"`
|
||||
// WaitForSeconds is a timeout for waiting for HTTP server to be
|
||||
// ready. If timeout will be passed and HTTP server will not be ready
|
||||
// to process requests - we will exit.
|
||||
WaitForSeconds int `yaml:"wait_for_seconds"`
|
||||
}
|
||||
|
||||
type Network struct {
|
||||
// Address represents address to bing in form of "ip:port".
|
||||
Address string `yaml:"address"`
|
||||
|
Reference in New Issue
Block a user