internal

package
v1.1.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseClientConfig

type DatabaseClientConfig struct {
	Url string `value:"${url}"`
}

DatabaseClientConfig 关系型数据库客户端配置,通常配合数据库名称前缀一起使用。

type GrpcEndpointConfig

type GrpcEndpointConfig struct {
	Address string `value:"${address:=127.0.0.1:9090}"`
}

GrpcEndpointConfig gRPC 服务端点配置,通常配合端点名称前缀一起使用。

type GrpcServerConfig

type GrpcServerConfig struct {
	Port int `value:"${port:=9090}"`
}

GrpcServerConfig gRPC 服务器配置,通常配合服务器名称前缀一起使用。

type MongoClientConfig

type MongoClientConfig struct {
	Url  string `value:"${url:=mongodb://localhost}"`
	Ping bool   `value:"${ping:=true}"` // 是否 PING 探测
}

MongoClientConfig MongoDB 客户端配置,通常配合客户端名称前缀一起使用。

type RedisClientConfig

type RedisClientConfig struct {
	Host           string `value:"${host:=127.0.0.1}"`    // IP
	Port           int    `value:"${port:=6379}"`         // 端口号
	Username       string `value:"${username:=}"`         // 用户名
	Password       string `value:"${password:=}"`         // 密码
	Database       int    `value:"${database:=0}"`        // DB 序号
	Ping           bool   `value:"${ping:=true}"`         // 是否 PING 探测
	ConnectTimeout int    `value:"${connect-timeout:=0}"` // 连接超时,毫秒
	ReadTimeout    int    `value:"${read-timeout:=0}"`    // 读取超时,毫秒
	WriteTimeout   int    `value:"${write-timeout:=0}"`   // 写入超时,毫秒
	IdleTimeout    int    `value:"${idle-timeout:=0}"`    // 空闲连接超时,毫秒
}

RedisClientConfig Redis 客户端配置,通常配合 redis 服务器名称前缀一起使用。

type WebServerConfig

type WebServerConfig struct {
	Host         string `value:"${host:=}"`            // 监听 IP
	Port         int    `value:"${port:=8080}"`        // HTTP 端口
	EnableSSL    bool   `value:"${ssl.enable:=false}"` // 是否启用 HTTPS
	KeyFile      string `value:"${ssl.key:=}"`         // SSL 秘钥
	CertFile     string `value:"${ssl.cert:=}"`        // SSL 证书
	BasePath     string `value:"${base-path:=/}"`      // 根路径
	ReadTimeout  int    `value:"${read-timeout:=0}"`   // 读取超时,毫秒
	WriteTimeout int    `value:"${write-timeout:=0}"`  // 写入超时,毫秒
}

WebServerConfig Web 服务器配置,通常配合 web 服务器名称前缀一起使用。

Jump to

Keyboard shortcuts

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