f-21: code: ajout d'un system de worker
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 2m2s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m33s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m40s
Pre Release Workflow / build (subnet, amd64, linux) (push) Successful in 1m37s
Pre Release Workflow / prerelease (push) Successful in 16s
Pre Release Workflow / build (vpc, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 7s
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 2m2s
Pre Release Workflow / build (db, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (dhcp, amd64, linux) (push) Successful in 1m32s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m33s
Pre Release Workflow / build (metacli, amd64, linux) (push) Successful in 1m40s
Pre Release Workflow / build (subnet, amd64, linux) (push) Successful in 1m37s
Pre Release Workflow / prerelease (push) Successful in 16s
Pre Release Workflow / build (vpc, amd64, linux) (push) Successful in 1m34s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 7s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
e1f7676093
commit
53ca41e635
9 changed files with 87 additions and 14 deletions
|
|
@ -16,6 +16,10 @@ type Config struct {
|
|||
Address string `mapstructure:"address"`
|
||||
Port int `mapstructure:"port"`
|
||||
} `mapstructure:"prometheus"`
|
||||
Worker struct {
|
||||
Count int `mapstructure:"count"`
|
||||
BufferSize int `mapstructure:"buffer_size"`
|
||||
} `mapstructure:"worker"`
|
||||
}
|
||||
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
|
|
@ -28,6 +32,8 @@ func LoadConfig(path string) (*Config, error) {
|
|||
v.SetDefault("api.port", 8080)
|
||||
v.SetDefault("prometheus.address", "")
|
||||
v.SetDefault("prometheus.port", 9090)
|
||||
v.SetDefault("worker.count", 4)
|
||||
v.SetDefault("worker.buffer_size", 100)
|
||||
|
||||
v.ReadInConfig()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue