Documentation
¶
Index ¶
- Variables
- func GetHostName(hostName string) string
- func InitCfg()
- type Action
- type Agent
- type App
- type AppLog
- type AppLogAliyun
- type AppLogDefault
- type AppLogDefaultProject
- type Assist
- type Auth
- type Casbin
- type ClientProxy
- type Cluster
- type CodePlatform
- type Configure
- type Database
- type Etcd
- type Gateway
- type GrafanaProxy
- type GrpcTest
- type HTTPProxy
- type HeartBeat
- type HttpRouter
- type JunoEvent
- type K8s
- type Logger
- type LoggerInfo
- type MultiProxy
- type Notice
- type Pprof
- type ProxyAuth
- type ProxyStream
- type Register
- type Server
- type ServerProxy
- type ServerSchema
- type SingleProxy
- type TLS
- type TestPlatform
- type UserVisit
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg cfg
Cfg ..
Functions ¶
Types ¶
type AppLog ¶ added in v0.3.0
type AppLog struct {
Enable bool
Mode string
Aliyun AppLogAliyun
Default AppLogDefault
}
AppLog ..
type AppLogAliyun ¶ added in v0.3.0
type AppLogAliyun struct {
Key string
Secret string
RoleArn string
RoleSessionName string
RegionID string `json:"regionId" toml:"regionId"`
LoginURL string `json:"loginUrl" toml:"loginUrl"`
}
AppLogAliyun ...
type AppLogDefault ¶ added in v0.4.0
type AppLogDefault struct {
DashboardUrl string
LogStoreUrl string
Project []AppLogDefaultProject
}
AppLogDefault ..
type AppLogDefaultProject ¶ added in v0.4.0
type AppLogDefaultProject struct {
Project string
Env []string
LogStoreConsole string
LogStoreJupiter string
LogStoreBiz string
}
AppLogDefaultProject ..
type Auth ¶
type Auth struct {
// Auth
LoginCookieName string
LoginMaximumInactiveLifetimeDays int
LoginMaximumLifetimeDays int
TokenRotationIntervalMinutes int
DisableLoginForm bool
DisableSignoutMenu bool
SignoutRedirectUrl string
OauthAutoLogin bool
OauthStateCookieMaxAge int
ApiKeyMaxSecondsToLive int
}
Auth ...
type Casbin ¶
type Casbin struct {
Enable bool
Debug bool
Model string
AutoLoad bool
AutoLoadInternal int
ResourceFile string
}
Casbin ..
type ClientProxy ¶
type ClientProxy struct {
HttpRouter HttpRouter
SingleProxy SingleProxy
MultiProxy []MultiProxy
}
type CodePlatform ¶ added in v0.4.0
type CodePlatform struct {
Token string
}
type Configure ¶
type Configure struct {
Dirs []string `json:"dirs"`
Prefixes []string `json:"prefixes"`
Agent struct {
Port int `json:"port"`
} `json:"agent"`
}
Configure ..
type Database ¶
type Database struct {
Enable bool
// DSN地址: mysql://root:secret@tcp(127.0.0.1:3307)/mysql?timeout=20s&readTimeout=20s
DSN string `json:"dsn" toml:"dsn"`
// Debug开关
Debug bool `json:"debug" toml:"debug"`
// 最大空闲连接数
MaxIdleConns int `json:"maxIdleConns" toml:"maxIdleConns"`
// 最大活动连接数
MaxOpenConns int `json:"maxOpenConns" toml:"maxOpenConns"`
// 连接的最大存活时间
ConnMaxLifetime time.Duration `json:"connMaxLifetime" toml:"connMaxLifetime"`
// 创建连接的错误级别,=panic时,如果创建失败,立即panic
OnDialError string `json:"level" toml:"level"`
// 慢日志阈值
SlowThreshold time.Duration `json:"slowThreshold" toml:"slowThreshold"`
// 拨超时时间
DialTimeout time.Duration `json:"dialTimeout" toml:"dialTimeout"`
// 关闭指标采集
DisableMetric bool `json:"disableMetric" toml:"disableMetric"`
// 关闭链路追踪
DisableTrace bool `json:"disableTrace" toml:"disableTrace"`
}
type Etcd ¶
type Etcd struct {
Enable bool `json:"enable"`
ListenAddr string `json:"listenAddr"`
Endpoints []string `json:"endpoints"`
Namespace string `json:"namespace"`
Timeout time.Duration `json:"timeout"`
TLS TLS `json:"tls"`
BasicAuth bool `json:"basicAuth"`
Password string `json:"password"`
UserName string `json:"userName"`
}
type GrafanaProxy ¶
type HTTPProxy ¶
type HTTPProxy struct {
Enable bool
ListenAddr string
Scheme string
Backend string
DisableKeepAlives bool
MaxIdleConns int
MaxIdelPerHost int
Timeout int
}
HTTPProxy ..
type HeartBeat ¶
type HeartBeat struct {
Enable bool `json:"enable"`
Debug bool `json:"debug"`
Addr string `json:"addr"`
Internal time.Duration `json:"internal"`
HostName string `json:"host_name"`
RegionCode string `json:"region_code"`
RegionName string `json:"region_name"`
ZoneCode string `json:"zone_code"`
ZoneName string `json:"zone_name"`
Env string `json:"env"`
}
type HttpRouter ¶
type HttpRouter struct {
GovernConfig string
}
type Logger ¶
type Logger struct {
Biz LoggerInfo
System LoggerInfo
}
type LoggerInfo ¶
type MultiProxy ¶
type MultiProxy struct {
Env string
ZoneCode string
Stream ProxyStream
HTTP HTTPProxy
DefaultEtcd Etcd
RegisterEtcd Etcd
}
MultiProxy ..
type Notice ¶ added in v0.4.0
type Notice struct {
Email struct {
ServerHost string `json:"serverHost" toml:"serverHost"`
ServerPort int `json:"serverPort" toml:"serverPort"`
FromEmail string `json:"fromEmail" toml:"fromEmail"`
FromPasswd string `json:"fromPasswd" toml:"fromPasswd"`
Subject string `json:"subject" toml:"subject"`
TemplatePath string `json:"templatePath" toml:"templatePath"`
Toers []string `json:"toers" toml:"toers"`
CCers []string `json:"cCers" toml:"cCers"`
}
Ding struct {
WebHook string `json:"webHook" toml:"webHook"`
} `json:"ding" toml:"ding"`
}
type ProxyStream ¶
type ServerProxy ¶
type ServerProxy struct {
Name string
Stream ProxyStream
HTTPServer ServerSchema
GrpcServer ServerSchema
GovernServer ServerSchema
HeartBeat HeartBeat
DefaultEtcd Etcd
RegisterEtcd Etcd
Prometheus HTTPProxy
}
ServerProxy ..
type ServerSchema ¶
type TestPlatform ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.