config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	// 最大条数
	// 达到数量后会主动触发推送
	Size int `json:"size,omitempty"`
	// 最大等待时间
	// 超过后会主动触发推送
	Wait time.Duration `json:"wait,omitempty"`
}

type Logging added in v0.0.9

type Logging struct {
	// 日志级别
	Level string `default:"debug" json:"level,omitempty" validate:"oneof=debug info warn error fatal"`
	// 类型
	Type core.Type `json:"type,omitempty" validate:"required,oneof=loki"`
	// 日志调用方法过滤层级
	Skip int `default:"2" json:"skip,omitempty"`
	// 调用堆栈层级
	Stacktrace *int `json:"stacktrace,omitempty"`
	// Loki日志配置
	Loki *Loki `json:"loki,omitempty" validate:"required_if=Type loki"`
}

type Loki

type Loki struct {
	// 推送地址
	Url string `json:"url,omitempty"validate:"required,url"`
	// 标签
	Labels map[string]string `json:"labels,omitempty"`
	// 批量操作
	Batch *Batch `json:"batch,omitempty"`
	// 用户名
	Username string `json:"username,omitempty" validate:"required_with=Password"`
	// 密码
	Password string `json:"password,omitempty" validate:"required_with=Username"`
	// 租户
	Tenant string `json:"tenant,omitempty"`
}

Jump to

Keyboard shortcuts

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