提交 ba5ef7b1 authored 作者: mooncake9527's avatar mooncake9527

update tag

上级 adebf4da
......@@ -102,41 +102,41 @@ func IsProd() bool {
type Config struct {
l *sync.RWMutex
App App `yaml:"app" json:"app"`
Auth Auth `yaml:"auth" json:"auth"`
App App `yaml:"app" json:"app" mapstructure:"app"`
Auth Auth `yaml:"auth" json:"auth" mapstructure:"auth"`
ConfType string `yaml:"confType" json:"confType"` // local, consul, nacos
ConfType string `yaml:"confType" json:"confType" mapstructure:"confType"` // local, consul, nacos
ConfCenter ConfCenter `yaml:"-" json:"-"`
Rd Rd `yaml:"rd" json:"rd"` // 注册中心
Database []Database `yaml:"database" json:"database"`
Etcd Etcd `yaml:"etcd" json:"etcd"`
Grpc Grpc `yaml:"grpc" json:"grpc"`
GrpcClient []GrpcClient `yaml:"grpcClient" json:"grpcClient"`
HTTP HTTP `yaml:"http" json:"http"`
Jaeger Jaeger `yaml:"jaeger" json:"jaeger"`
Logger Logger `yaml:"logger" json:"logger"`
Redis Redis `yaml:"redis" json:"redis"`
Cron Cron `yaml:"cron" json:"cron"`
Oss oss.AliOssConfig `yaml:"oss" json:"oss"`
Rd Rd `yaml:"rd" json:"rd" mapstructure:"rd"` // 注册中心
Database []Database `yaml:"database" json:"database" mapstructure:"database"`
Etcd Etcd `yaml:"etcd" json:"etcd" mapstructure:"etcd"`
Grpc Grpc `yaml:"grpc" json:"grpc" mapstructure:"grpc"`
GrpcClient []GrpcClient `yaml:"grpcClient" json:"grpcClient" mapstructure:"grpcClient"`
HTTP HTTP `yaml:"http" json:"http" mapstructure:"http"`
Jaeger Jaeger `yaml:"jaeger" json:"jaeger" mapstructure:"jaeger"`
Logger Logger `yaml:"logger" json:"logger" mapstructure:"logger"`
Redis Redis `yaml:"redis" json:"redis" mapstructure:"redis"`
Cron Cron `yaml:"cron" json:"cron" mapstructure:"cron"`
Oss oss.AliOssConfig `yaml:"oss" json:"oss" mapstructure:"oss"`
Content []byte `yaml:"-" json:"-"`
}
type Snowflake struct {
Node int `yaml:"node" json:"node"`
Node int `yaml:"node" json:"node" mapstructure:"node"`
}
// 选择哪个配置中心
type ConfCenter struct {
Local Local `yaml:"-" json:"local"`
Nacos NacosConfConfig `yaml:"nacos" json:"nacos"`
Consul Consul `yaml:"-" json:"consul"`
Local Local `yaml:"-" json:"local" mapstructure:"local"`
Nacos NacosConfConfig `yaml:"nacos" json:"nacos" mapstructure:"nacos"`
Consul Consul `yaml:"-" json:"consul" mapstructure:"consul"`
}
type Rd struct {
Type string `yaml:"type" json:"type"`
Nacos NacosSvcConfig `yaml:"nacos" json:"nacos"`
Type string `yaml:"type" json:"type" mapstructure:"type"`
Nacos NacosSvcConfig `yaml:"nacos" json:"nacos" mapstructure:"nacos"`
}
func (x *Config) GetContent() []byte {
......@@ -172,123 +172,123 @@ type Local struct {
}
type Auth struct {
Enable bool `yaml:"enable" json:"enable"`
SignKey string `yaml:"signKey" json:"signKey"`
Expire time.Duration `yaml:"expire" json:"expire"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
SignKey string `yaml:"signKey" json:"signKey" mapstructure:"signKey"`
Expire time.Duration `yaml:"expire" json:"expire" mapstructure:"expire"`
}
type Consul struct {
Conf string `yaml:"conf" json:"conf"`
Addr string `yaml:"addr" json:"addr"`
Token string `yaml:"token" json:"token"`
Conf string `yaml:"conf" json:"conf" mapstructure:"conf"`
Addr string `yaml:"addr" json:"addr" mapstructure:"addr"`
Token string `yaml:"token" json:"token" mapstructure:"token"`
}
type Etcd struct {
Addrs []string `yaml:"addrs" json:"addrs"`
Addrs []string `yaml:"addrs" json:"addrs" mapstructure:"addrs"`
}
type Jaeger struct {
AgentHost string `yaml:"agentHost" json:"agentHost"`
AgentPort int `yaml:"agentPort" json:"agentPort"`
AgentHost string `yaml:"agentHost" json:"agentHost" mapstructure:"agentHost"`
AgentPort int `yaml:"agentPort" json:"agentPort" mapstructure:"agentPort"`
}
type ClientToken struct {
AppID string `yaml:"appID" json:"appID"`
AppKey string `yaml:"appKey" json:"appKey"`
Enable bool `yaml:"enable" json:"enable"`
AppID string `yaml:"appID" json:"appID" mapstructure:"appID"`
AppKey string `yaml:"appKey" json:"appKey" mapstructure:"appKey"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
}
type ClientSecure struct {
CaFile string `yaml:"caFile" json:"caFile"`
CertFile string `yaml:"certFile" json:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile"`
ServerName string `yaml:"serverName" json:"serverName"`
Type string `yaml:"type" json:"type"`
CaFile string `yaml:"caFile" json:"caFile" mapstructure:"caFile"`
CertFile string `yaml:"certFile" json:"certFile" mapstructure:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile" mapstructure:"keyFile"`
ServerName string `yaml:"serverName" json:"serverName" mapstructure:"serverName"`
Type string `yaml:"type" json:"type" mapstructure:"type"`
}
type ServerSecure struct {
CaFile string `yaml:"caFile" json:"caFile"`
CertFile string `yaml:"certFile" json:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile"`
Type string `yaml:"type" json:"type"`
CaFile string `yaml:"caFile" json:"caFile" mapstructure:"caFile"`
CertFile string `yaml:"certFile" json:"certFile" mapstructure:"certFile"`
KeyFile string `yaml:"keyFile" json:"keyFile" mapstructure:"keyFile"`
Type string `yaml:"type" json:"type" mapstructure:"type"`
}
type Email struct {
SMTPServer string `yaml:"smtpServer" json:"smtpServer"`
SMTPPort int `yaml:"smtpPort" json:"smtpPort"`
SMTPUsername string `yaml:"smtpUsername" json:"smtpUsername"`
SMTPPassword string `yaml:"smtpPassword" json:"smtpPassword"`
FromEmail string `yaml:"fromEmail" json:"fromEmail"`
ExpireDuration string `yaml:"expireDuration" json:"expireDuration"`
SMTPServer string `yaml:"smtpServer" json:"smtpServer" mapstructure:"smtpServer"`
SMTPPort int `yaml:"smtpPort" json:"smtpPort" mapstructure:"smtpPort"`
SMTPUsername string `yaml:"smtpUsername" json:"smtpUsername" mapstructure:"smtpUsername"`
SMTPPassword string `yaml:"smtpPassword" json:"smtpPassword" mapstructure:"smtpPassword"`
FromEmail string `yaml:"fromEmail" json:"fromEmail" mapstructure:"fromEmail"`
ExpireDuration string `yaml:"expireDuration" json:"expireDuration" mapstructure:"expireDuration"`
}
type App struct {
CacheType string `yaml:"cacheType" json:"cacheType"`
ContextPath string `yaml:"contextPath" json:"contextPath"`
Middleware Middleware `yaml:"middleware" json:"middleware"`
CacheType string `yaml:"cacheType" json:"cacheType" mapstructure:"cacheType"`
ContextPath string `yaml:"contextPath" json:"contextPath" mapstructure:"contextPath"`
Middleware Middleware `yaml:"middleware" json:"middleware" mapstructure:"middleware"`
Env string `yaml:"env" json:"env"`
Host string `yaml:"host" json:"host"`
Name string `yaml:"name" json:"name"`
Version string `yaml:"version" json:"version"`
IPRateLimiter IPRateLimiter `yaml:"ipRateLimiter" json:"ipRateLimiter"`
Env string `yaml:"env" json:"env" mapstructure:"env"`
Host string `yaml:"host" json:"host" mapstructure:"host"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
Version string `yaml:"version" json:"version" mapstructure:"version"`
IPRateLimiter IPRateLimiter `yaml:"ipRateLimiter" json:"ipRateLimiter" mapstructure:"ipRateLimiter"`
HideSensitiveFields string `yaml:"hideSensitiveFields" json:"hideSensitiveFields"`
ConfPath string `yaml:"-" json:"confPath"`
PodName string `yaml:"-" json:"podName"`
WebLog WebLog `yaml:"webLog" json:"webLog"`
Email Email `yaml:"email" json:"email"`
IDGeneration IDGeneration `yaml:"idGeneration" json:"idGeneration"`
HideSensitiveFields string `yaml:"hideSensitiveFields" json:"hideSensitiveFields" mapstructure:"hideSensitiveFields"`
ConfPath string `yaml:"-" json:"confPath" mapstructure:"confPath"`
PodName string `yaml:"-" json:"podName" mapstructure:"podName"`
WebLog WebLog `yaml:"webLog" json:"webLog" mapstructure:"webLog"`
Email Email `yaml:"email" json:"email" mapstructure:"email"`
IDGeneration IDGeneration `yaml:"idGeneration" json:"idGeneration" mapstructure:"idGeneration"`
}
type Middleware struct {
Cors Cors `yaml:"cors" json:"cors"`
RequestID RequestID `yaml:"requestID" json:"requestID"`
EnableCircuitBreaker bool `yaml:"enableCircuitBreaker" json:"enableCircuitBreaker"`
EnableHTTPProfile bool `yaml:"enableHTTPProfile" json:"enableHTTPProfile"`
EnableLimit bool `yaml:"enableLimit" json:"enableLimit"`
EnableMetrics bool `yaml:"enableMetrics" json:"enableMetrics"`
EnableStat bool `yaml:"enableStat" json:"enableStat"`
Trace Trace `yaml:"trace" json:"trace"`
Cors Cors `yaml:"cors" json:"cors" mapstructure:"cors"`
RequestID RequestID `yaml:"requestID" json:"requestID" mapstructure:"requestID"`
EnableCircuitBreaker bool `yaml:"enableCircuitBreaker" json:"enableCircuitBreaker" mapstructure:"enableCircuitBreaker"`
EnableHTTPProfile bool `yaml:"enableHTTPProfile" json:"enableHTTPProfile" mapstructure:"enableHTTPProfile"`
EnableLimit bool `yaml:"enableLimit" json:"enableLimit" mapstructure:"enableLimit"`
EnableMetrics bool `yaml:"enableMetrics" json:"enableMetrics" mapstructure:"enableMetrics"`
EnableStat bool `yaml:"enableStat" json:"enableStat" mapstructure:"enableStat"`
Trace Trace `yaml:"trace" json:"trace" mapstructure:"trace"`
}
type Cors struct {
Enable bool `yaml:"enable" json:"enable"`
AllowOrigins []string `yaml:"allowOrigins" json:"allowOrigins"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
AllowOrigins []string `yaml:"allowOrigins" json:"allowOrigins" mapstructure:"allowOrigins"`
}
type RequestID struct {
Key string `yaml:"key" json:"key"`
Key string `yaml:"key" json:"key" mapstructure:"key"`
}
type IDGeneration struct {
Type string `yaml:"type" json:"type"` // snowflake or leaf
Leaf Leaf `yaml:"leaf" json:"leaf"`
Snowflake Snowflake `yaml:"snowflake" json:"snowflake"`
Type string `yaml:"type" json:"type" mapstructure:"type"` // snowflake or leaf
Leaf Leaf `yaml:"leaf" json:"leaf" mapstructure:"leaf"`
Snowflake Snowflake `yaml:"snowflake" json:"snowflake" mapstructure:"snowflake"`
}
type WebLog struct {
Enable bool `yaml:"enable" json:"enable"`
Schema string `yaml:"schema" json:"schema"`
IgnorePaths []string `yaml:"ignorePaths" json:"ignorePaths"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Schema string `yaml:"schema" json:"schema" mapstructure:"schema"`
IgnorePaths []string `yaml:"ignorePaths" json:"ignorePaths" mapstructure:"ignorePaths"`
}
type Trace struct {
Enable bool `yaml:"enable" json:"enable"`
SamplingRate float64 `yaml:"samplingRate" json:"samplingRate"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
SamplingRate float64 `yaml:"samplingRate" json:"samplingRate" mapstructure:"samplingRate"`
}
type IPRateLimiter struct {
Enable bool `yaml:"enable" json:"enable"`
Type string `yaml:"type" json:"type"` // redis or local
Window string `yaml:"window" json:"window"`
MaxRequests int `yaml:"maxRequests" json:"maxRequests"`
Store RateLimiterStore `yaml:"store" json:"store"`
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Type string `yaml:"type" json:"type" mapstructure:"type"` // redis or local
Window string `yaml:"window" json:"window" mapstructure:"window"`
MaxRequests int `yaml:"maxRequests" json:"maxRequests" mapstructure:"maxRequests"`
Store RateLimiterStore `yaml:"store" json:"store" mapstructure:"store"`
}
type RateLimiterStore struct {
Type string `yaml:"type" json:"type"`
Redis Redis `yaml:"redis" json:"redis"`
Type string `yaml:"type" json:"type" mapstructure:"type"`
Redis Redis `yaml:"redis" json:"redis" mapstructure:"redis"`
}
func (x IPRateLimiter) Get() (time.Duration, int) {
......@@ -306,121 +306,121 @@ func (x IPRateLimiter) Get() (time.Duration, int) {
}
type GrpcClient struct {
ClientSecure ClientSecure `yaml:"clientSecure" json:"clientSecure"`
ClientToken ClientToken `yaml:"clientToken" json:"clientToken"`
Host string `yaml:"host" json:"host"`
Name string `yaml:"name" json:"name"`
Port int `yaml:"port" json:"port"`
RegistryDiscoveryType string `yaml:"registryDiscoveryType" json:"registryDiscoveryType"`
Timeout int `yaml:"timeout" json:"timeout"`
ClientSecure ClientSecure `yaml:"clientSecure" json:"clientSecure" mapstructure:"clientSecure"`
ClientToken ClientToken `yaml:"clientToken" json:"clientToken" mapstructure:"clientToken"`
Host string `yaml:"host" json:"host" mapstructure:"host"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
Port int `yaml:"port" json:"port" mapstructure:"port"`
RegistryDiscoveryType string `yaml:"registryDiscoveryType" json:"registryDiscoveryType" mapstructure:"registryDiscoveryType"`
Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
}
type Sqlite struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"`
DBFile string `yaml:"dbFile" json:"dbFile"`
EnableLog bool `yaml:"enableLog" json:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"`
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
DBFile string `yaml:"dbFile" json:"dbFile" mapstructure:"dbFile"`
EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
}
type Mysql struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog"`
MastersDsn []string `yaml:"mastersDsn" json:"mastersDsn"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"`
SlavesDsn []string `yaml:"slavesDsn" json:"slavesDsn"`
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MastersDsn []string `yaml:"mastersDsn" json:"mastersDsn" mapstructure:"mastersDsn"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
SlavesDsn []string `yaml:"slavesDsn" json:"slavesDsn" mapstructure:"slavesDsn"`
}
type Postgresql struct {
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns"`
ConnMaxLifetime int `yaml:"connMaxLifetime" json:"connMaxLifetime" mapstructure:"connMaxLifetime"`
Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
EnableLog bool `yaml:"enableLog" json:"enableLog" mapstructure:"enableLog"`
MaxIdleConns int `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
}
type Redis struct {
DialTimeout int `yaml:"dialTimeout" json:"dialTimeout"`
Dsn string `yaml:"dsn" json:"dsn"`
ReadTimeout int `yaml:"readTimeout" json:"readTimeout"`
WriteTimeout int `yaml:"writeTimeout" json:"writeTimeout"`
DialTimeout int `yaml:"dialTimeout" json:"dialTimeout" mapstructure:"dialTimeout"`
Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
ReadTimeout int `yaml:"readTimeout" json:"readTimeout" mapstructure:"readTimeout"`
WriteTimeout int `yaml:"writeTimeout" json:"writeTimeout" mapstructure:"writeTimeout"`
}
type Database struct {
Name string `yaml:"name" json:"name"`
Driver string `yaml:"driver" json:"driver"`
Mongodb Mongodb `yaml:"mongodb" json:"mongodb"`
Mysql Mysql `yaml:"mysql" json:"mysql"`
Postgresql Mysql `yaml:"postgresql" json:"postgresql"`
Sqlite Sqlite `yaml:"sqlite" json:"sqlite"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
Driver string `yaml:"driver" json:"driver" mapstructure:"driver"`
Mongodb Mongodb `yaml:"mongodb" json:"mongodb" mapstructure:"mongodb"`
Mysql Mysql `yaml:"mysql" json:"mysql" mapstructure:"mysql"`
Postgresql Mysql `yaml:"postgresql" json:"postgresql" mapstructure:"postgresql"`
Sqlite Sqlite `yaml:"sqlite" json:"sqlite" mapstructure:"sqlite"`
}
type Mongodb struct {
Dsn string `yaml:"dsn" json:"dsn"`
Dsn string `yaml:"dsn" json:"dsn" mapstructure:"dsn"`
}
type Grpc struct {
EnableToken bool `yaml:"enableToken" json:"enableToken"`
HTTPPort int `yaml:"httpPort" json:"httpPort"`
Port int `yaml:"port" json:"port"`
ServerSecure ServerSecure `yaml:"serverSecure" json:"serverSecure"`
EnableToken bool `yaml:"enableToken" json:"enableToken" mapstructure:"enableToken"`
HTTPPort int `yaml:"httpPort" json:"httpPort" mapstructure:"httpPort"`
Port int `yaml:"port" json:"port" mapstructure:"port"`
ServerSecure ServerSecure `yaml:"serverSecure" json:"serverSecure" mapstructure:"serverSecure"`
}
type Logger struct {
Format string `yaml:"format" json:"format"`
IsSave bool `yaml:"isSave" json:"isSave"`
Level string `yaml:"level" json:"level"`
LogFileConfig LogFileConfig `yaml:"logFileConfig" json:"logFileConfig"`
Format string `yaml:"format" json:"format" mapstructure:"format"`
IsSave bool `yaml:"isSave" json:"isSave" mapstructure:"isSave"`
Level string `yaml:"level" json:"level" mapstructure:"level"`
LogFileConfig LogFileConfig `yaml:"logFileConfig" json:"logFileConfig" mapstructure:"logFileConfig"`
}
type LogFileConfig struct {
Filename string `yaml:"filename" json:"filename"`
MaxSize int `yaml:"maxSize" json:"maxSize"`
MaxBackups int `yaml:"maxBackups" json:"maxBackups"`
MaxAge int `yaml:"maxAge" json:"maxAge"`
IsCompression bool `yaml:"isCompression" json:"isCompression"`
Filename string `yaml:"filename" json:"filename" mapstructure:"filename"`
MaxSize int `yaml:"maxSize" json:"maxSize" mapstructure:"maxSize"`
MaxBackups int `yaml:"maxBackups" json:"maxBackups" mapstructure:"maxBackups"`
MaxAge int `yaml:"maxAge" json:"maxAge" mapstructure:"maxAge"`
IsCompression bool `yaml:"isCompression" json:"isCompression" mapstructure:"isCompression"`
}
type HTTP struct {
Port int `yaml:"port" json:"port"`
Timeout int `yaml:"timeout" json:"timeout"`
Port int `yaml:"port" json:"port" mapstructure:"port"`
Timeout int `yaml:"timeout" json:"timeout" mapstructure:"timeout"`
}
type UpgradeConfig struct {
Limits []UpgradeLimit `yaml:"limits" json:"limits"`
Limits []UpgradeLimit `yaml:"limits" json:"limits" mapstructure:"limits"`
}
type UpgradeLimit struct {
MaxCount int64 `mapstructure:"max-count" json:"max-count" yaml:"max-count"`
Duration time.Duration `yaml:"duration" json:"duration"`
Tip string `yaml:"tip" json:"tip"`
Duration time.Duration `yaml:"duration" json:"duration" mapstructure:"duration"`
Tip string `yaml:"tip" json:"tip" mapstructure:"tip"`
}
type Cron struct {
Type string `yaml:"type" json:"type"` // xxl
Enable bool `yaml:"enable" json:"enable"`
Schema string `yaml:"schema" json:"schema"`
XXL XXL `yaml:"xxl" json:"xxl"`
Type string `yaml:"type" json:"type" mapstructure:"type"` // xxl
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Schema string `yaml:"schema" json:"schema" mapstructure:"schema"`
XXL XXL `yaml:"xxl" json:"xxl" mapstructure:"xxl"`
}
type XXL struct {
Addr string `yaml:"addr" json:"addr"` // http://xxl-job-admin.xxl-job:8080/xxl-job-admin
Token string `yaml:"token" json:"token"` // 12345
Executor string `yaml:"executor" json:"executor"` //
Addr string `yaml:"addr" json:"addr" mapstructure:"addr"` // http://xxl-job-admin.xxl-job:8080/xxl-job-admin
Token string `yaml:"token" json:"token" mapstructure:"token"` // 12345
Executor string `yaml:"executor" json:"executor" mapstructure:"executor"` //
}
type Leaf struct {
Addr string `yaml:"addr" json:"addr"` // eg http://leaf.qitu
ShowLog bool `yaml:"showLog" json:"showLog"`
RetryCount int `yaml:"retryCount" json:"retryCount"`
Addr string `yaml:"addr" json:"addr" mapstructure:"addr"` // eg http://leaf.qitu
ShowLog bool `yaml:"showLog" json:"showLog" mapstructure:"showLog"`
RetryCount int `yaml:"retryCount" json:"retryCount" mapstructure:"retryCount"`
}
type CronJob struct {
Name string `yaml:"name" json:"name"`
TimeSpec string `yaml:"timeSpec" json:"timeSpec"`
IsRunOnce bool ` yaml:"isRunOnce" json:"isRunOnce"` // if the task is only run once
Enable bool `yaml:"enable" json:"enable"`
Args string `yaml:"args" json:"args"`
Name string `yaml:"name" json:"name" mapstructure:"name"`
TimeSpec string `yaml:"timeSpec" json:"timeSpec" mapstructure:"timeSpec"`
IsRunOnce bool `yaml:"isRunOnce" json:"isRunOnce" mapstructure:"isRunOnce"` // if the task is only run once
Enable bool `yaml:"enable" json:"enable" mapstructure:"enable"`
Args string `yaml:"args" json:"args" mapstructure:"args"`
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论