feat: expose timeout variables (#622)

* expose timeout variables

* formatting
This commit is contained in:
Hayden 2023-11-15 21:17:43 -06:00 committed by GitHub
parent a70ee33759
commit eeae790fe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 13 deletions

View file

@ -38,7 +38,7 @@ func New() *EventBus {
subscribers: map[Event][]func(any){
EventLabelMutation: {},
EventLocationMutation: {},
EventItemMutation: {},
EventItemMutation: {},
},
}
}

View file

@ -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 {

View file

@ -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