mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-08 19:48:35 +00:00
feat: expose timeout variables (#622)
* expose timeout variables * formatting
This commit is contained in:
parent
a70ee33759
commit
eeae790fe4
7 changed files with 21 additions and 13 deletions
|
@ -38,7 +38,7 @@ func New() *EventBus {
|
|||
subscribers: map[Event][]func(any){
|
||||
EventLabelMutation: {},
|
||||
EventLocationMutation: {},
|
||||
EventItemMutation: {},
|
||||
EventItemMutation: {},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
fk = faker.NewFaker()
|
||||
tbus = eventbus.New()
|
||||
fk = faker.NewFaker()
|
||||
tbus = eventbus.New()
|
||||
|
||||
tClient *ent.Client
|
||||
tRepos *AllRepos
|
||||
|
@ -45,7 +45,7 @@ func TestMain(m *testing.M) {
|
|||
log.Fatalf("failed opening connection to sqlite: %v", err)
|
||||
}
|
||||
|
||||
go tbus.Run()
|
||||
go tbus.Run()
|
||||
|
||||
err = client.Schema.Create(context.Background())
|
||||
if err != nil {
|
||||
|
|
|
@ -36,9 +36,12 @@ type DebugConf struct {
|
|||
}
|
||||
|
||||
type WebConfig struct {
|
||||
Port string `yaml:"port" conf:"default:7745"`
|
||||
Port string `yaml:"port" conf:"default:7745"`
|
||||
Host string `yaml:"host"`
|
||||
MaxUploadSize int64 `yaml:"max_file_upload" conf:"default:10"`
|
||||
ReadTimeout int `yaml:"read_timeout" conf:"default:10"`
|
||||
WriteTimeout int `yaml:"write_timeout" conf:"default:10"`
|
||||
IdleTimeout int `yaml:"idle_timeout" conf:"default:30"`
|
||||
}
|
||||
|
||||
// New parses the CLI/Config file and returns a Config struct. If the file argument is an empty string, the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue