model

package
v0.0.0-...-213ebd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port string   `yaml:"port"`
	Log  LogConf  `yaml:"log"`
	Otel OtelConf `yaml:"otel"`
}

func (*Config) Validate

func (c *Config) Validate() error

type LogConf

type LogConf struct {
	Dir        string `yaml:"dir"`
	Name       string `yaml:"name"`
	Level      string `yaml:"level"`
	MaxSize    int    `yaml:"max_size"`    // 一个文件最大可达多少M。
	MaxBackups int    `yaml:"max_backups"` // 最多同时保存多少个文件。
	MaxAge     int    `yaml:"max_age"`     // 一个文件最多可以保存多少天。
	Compress   bool   `yaml:"compress"`    // 用 gzip 压缩。
}

func (*LogConf) Validate

func (l *LogConf) Validate() error

type OtelConf

type OtelConf struct {
	GrpcAddress string `yaml:"grpc_address"`
}

func (*OtelConf) Validate

func (o *OtelConf) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL