-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
yaml_parser.go
40 lines (32 loc) · 922 Bytes
/
yaml_parser.go
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
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
package logging
type RequestConfig struct {
HTTP HTTPProtocolConfigs `yaml:"http"`
GRPC GRPCProtocolConfigs `yaml:"grpc"`
Options OptionsConfig `yaml:"options"`
}
type HTTPProtocolConfigs struct {
Options OptionsConfig `yaml:"options"`
Config []HTTPProtocolConfig `yaml:"config"`
}
type GRPCProtocolConfigs struct {
Options OptionsConfig `yaml:"options"`
Config []GRPCProtocolConfig `yaml:"config"`
}
type OptionsConfig struct {
Level string `yaml:"level"`
Decision DecisionConfig `yaml:"decision"`
}
type DecisionConfig struct {
LogStart bool `yaml:"log_start"`
LogEnd bool `yaml:"log_end"`
}
type HTTPProtocolConfig struct {
Path string `yaml:"path"`
Port uint64 `yaml:"port"`
}
type GRPCProtocolConfig struct {
Service string `yaml:"service"`
Method string `yaml:"method"`
}