github.com/thanos-io/thanos@v0.32.5/pkg/logging/yaml_parser.go (about)

     1  // Copyright (c) The Thanos Authors.
     2  // Licensed under the Apache License 2.0.
     3  
     4  package logging
     5  
     6  type RequestConfig struct {
     7  	HTTP    HTTPProtocolConfigs `yaml:"http"`
     8  	GRPC    GRPCProtocolConfigs `yaml:"grpc"`
     9  	Options OptionsConfig       `yaml:"options"`
    10  }
    11  
    12  type HTTPProtocolConfigs struct {
    13  	Options OptionsConfig        `yaml:"options"`
    14  	Config  []HTTPProtocolConfig `yaml:"config"`
    15  }
    16  
    17  type GRPCProtocolConfigs struct {
    18  	Options OptionsConfig        `yaml:"options"`
    19  	Config  []GRPCProtocolConfig `yaml:"config"`
    20  }
    21  
    22  type OptionsConfig struct {
    23  	Level    string         `yaml:"level"`
    24  	Decision DecisionConfig `yaml:"decision"`
    25  }
    26  
    27  type DecisionConfig struct {
    28  	LogStart bool `yaml:"log_start"`
    29  	LogEnd   bool `yaml:"log_end"`
    30  }
    31  
    32  type HTTPProtocolConfig struct {
    33  	Path string `yaml:"path"`
    34  	Port uint64 `yaml:"port"`
    35  }
    36  
    37  type GRPCProtocolConfig struct {
    38  	Service string `yaml:"service"`
    39  	Method  string `yaml:"method"`
    40  }