conf

package
v1.3.0-rc.0...-d217119 Latest Latest
Warning

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

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

Documentation

Overview

Package conf 配置文件信息

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompensationExecCron

func CompensationExecCron() string

CompensationExecCron 审计补偿周期

func Debug

func Debug() bool

Debug 是否处于调试模式

func ListenAddr

func ListenAddr() string

ListenAddr 返回 ListenAddr 选项.

func Load

func Load()

Load 加载环境变量配置.

func SelfAddr

func SelfAddr() string

SelfAddr 返回 SELF_ADDR

func UCAddr

func UCAddr() string

UCAddr 返回 UCAddr 选项.

func UCAuditorCron

func UCAuditorCron() string

UCAuditorCron 返回 uc审计拉取周期

func UCAuditorPullSize

func UCAuditorPullSize() uint64

UCAuditorPullSize 返回 uc审计拉取大小

func UCClientID

func UCClientID() string

UCClientID 返回 UCClientID 选项.

func UCClientSecret

func UCClientSecret() string

UCClientSecret 返回 UCClientSecret 选项.

func UCSyncRecordCleanCron

func UCSyncRecordCleanCron() string

UCSyncRecordCleanCron uc同步记录清理周期

Types

type Conf

type Conf struct {
	ListenAddr            string `env:"LISTEN_ADDR" default:":12580"`
	Debug                 bool   `env:"DEBUG" default:"false"`
	SelfAddr              string `env:"SELF_ADDR"`
	UCAddr                string `env:"UC_ADDR"`
	UCClientID            string `env:"UC_CLIENT_ID"`
	UCClientSecret        string `env:"UC_CLIENT_SECRET"`
	UCAuditorCron         string `env:"UC_AUDITOR_CRON" default:"0 */1 * * * ?"`        // UC审计拉取周期
	UCAuditorPullSize     uint64 `env:"UC_AUDITOR_PULL_SIZE" default:"30"`              // UC审计拉取大小
	CompensationExecCron  string `env:"COMPENSATION_EXEC_CRON" default:"0 */5 * * * ?"` // UC审计发送失败,补偿周期
	UCSyncRecordCleanCron string `env:"UC_SYNCRECORD_CLEAN_CRON" default:"0 0 3 * * ?"` // UC同步记录删除周期
}

Conf Adaptor 环境变量配置项

Jump to

Keyboard shortcuts

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