summaryrefslogtreecommitdiff
path: root/internal/configuration/schema/server.go
blob: 07169ad8af547d35163f8ce609f540b2b6b91a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package schema

// ServerConfiguration represents the configuration of the http server.
type ServerConfiguration struct {
	Host            string `koanf:"host"`
	Port            int    `koanf:"port"`
	Path            string `koanf:"path"`
	ReadBufferSize  int    `koanf:"read_buffer_size"`
	WriteBufferSize int    `koanf:"write_buffer_size"`
	EnablePprof     bool   `koanf:"enable_endpoint_pprof"`
	EnableExpvars   bool   `koanf:"enable_endpoint_expvars"`

	TLS ServerTLSConfiguration `koanf:"tls"`
}

// ServerTLSConfiguration represents the configuration of the http servers TLS options.
type ServerTLSConfiguration struct {
	Certificate string `koanf:"certificate"`
	Key         string `koanf:"key"`
}

// DefaultServerConfiguration represents the default values of the ServerConfiguration.
var DefaultServerConfiguration = ServerConfiguration{
	Host:            "0.0.0.0",
	Port:            9091,
	ReadBufferSize:  4096,
	WriteBufferSize: 4096,
}