yaml_def.go 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package hieda_yamlutil
  2. type CommonLogConfigYAML_BKE_AliSLS_ExtendCfg struct {
  3. TotalSizeLnBytes int64 `yaml:"total_size_ln_bytes"`
  4. MaxIoWorkerCount int64 `yaml:"max_io_worker_count"`
  5. MaxBlockSec int `yaml:"max_block_sec"`
  6. MaxBatchSize int64 `yaml:"max_batch_size"`
  7. MaxBatchCount int `yaml:"max_batch_count"`
  8. LingerMs int64 `yaml:"linger_ms"`
  9. Retries int `yaml:"retries"`
  10. MaxReservedAttempts int `yaml:"max_reserved_attempts"`
  11. BaseRetryBackoffMs int64 `yaml:"base_retry_backoff_ms"`
  12. MaxRetryBackoffMs int64 `yaml:"max_retry_backoff_ms"`
  13. AdjustShargHash bool `yaml:"adjust_sharg_hash"`
  14. Buckets int `yaml:"buckets"`
  15. AllowLogLevel string `yaml:"allow_log_level"`
  16. LogFileName string `yaml:"log_file_name"`
  17. IsJsonType bool `yaml:"is_json_type"`
  18. LogMaxSize int `yaml:"log_max_size"`
  19. LogMaxBackups int `yaml:"log_max_backups"`
  20. LogCompress bool `yaml:"log_compress"`
  21. NoRetryStatusCodeList []int `yaml:"no_retry_status_code_list"`
  22. }
  23. type CommonLogConfigYAML_BKE_AliSLS struct {
  24. EnableAliSLSProducerDebug bool `yaml:"alisls_producer_debug"`
  25. Hostname string `yaml:"hostname"`
  26. AppName string `yaml:"appname"`
  27. Appkey string `yaml:"ak_id"`
  28. Secret string `yaml:"ak_secret"`
  29. Endpoint string `yaml:"endpoint"`
  30. Project string `yaml:"project"`
  31. Logstore string `yaml:"logstore"`
  32. Topic string `yaml:"topic"`
  33. EmitIP string `yaml:"emit_ip"`
  34. OverrideWithRealIP bool `yaml:"override_with_real_ip"`
  35. ExtendAliSLSConfig *CommonLogConfigYAML_BKE_AliSLS_ExtendCfg `yaml:"extend_alisls_config"`
  36. }
  37. type CommonLogConfigYAML_BKE_Console struct {
  38. To string `yaml:"to"`
  39. }
  40. type CommonLogConfigYAML_BKE_File_RotateConfig struct {
  41. MaxSize int `yaml:"maxsize"`
  42. MaxAge int `yaml:"maxage"`
  43. MaxBackups int `yaml:"maxbackups"`
  44. LocalTime bool `yaml:"localtime"`
  45. Compress bool `yaml:"compress"`
  46. }
  47. type CommonLogConfigYAML_BKE_File struct {
  48. Filename string `yaml:"filename"`
  49. FVConsole bool `yaml:"fvconsole"`
  50. Rotate bool `yaml:"rotate"`
  51. RotateConfig *CommonLogConfigYAML_BKE_File_RotateConfig `yaml:"rotate_config"`
  52. }
  53. type CommonLogConfigYAML_Backend struct {
  54. Type string `yaml:"type"`
  55. Level string `yaml:"level"`
  56. ConsoleConfig *CommonLogConfigYAML_BKE_Console `yaml:"console_config"`
  57. FileConfig *CommonLogConfigYAML_BKE_File `yaml:"file_config"`
  58. AliSLSConfig *CommonLogConfigYAML_BKE_AliSLS `yaml:"alisls_config"`
  59. }
  60. type CommonLogConfigYAML struct {
  61. Enable bool `yaml:"enable"`
  62. Backends map[string]CommonLogConfigYAML_Backend `yaml:"backends"`
  63. }