setting

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliRocketMQSettingS

type AliRocketMQSettingS struct {
	BusinessName string
	RegionId     string
	AccessKey    string
	SecretKey    string
	InstanceId   string
	HttpEndpoint string
}

AliRocketMQSettingS defines for ali yun RocketMQ queue

type G2CacheSettingS

type G2CacheSettingS struct {
	CacheDebug             bool
	CacheMonitor           bool
	OutCachePubSub         bool
	CacheMonitorSecond     int
	EntryLazyFactor        int
	GPoolWorkerNum         int
	GPoolJobQueueChanLen   int
	FreeCacheSize          int // byte size
	PubSubRedisChannel     string
	RedisConfDSN           string
	RedisConfDB            int
	RedisConfPwd           string
	RedisConfMaxConn       int
	PubSubRedisConfDSN     string
	PubSubRedisConfDB      int
	PubSubRedisConfPwd     string
	PubSubRedisConfMaxConn int
}

type GPoolSettingS

type GPoolSettingS struct {
	WorkerNum  int
	JobChanLen int
}

type HttpRateLimitSettingS

type HttpRateLimitSettingS struct {
	MaxConcurrent int
}

type HttpServerSettingS

type HttpServerSettingS struct {
	Network      string
	ReadTimeout  int
	WriteTimeout int
	IdleTimeout  int
	SupportH2    bool
	// contains filtered or unexported fields
}

func (*HttpServerSettingS) GetAddr

func (s *HttpServerSettingS) GetAddr() string

func (*HttpServerSettingS) GetIdleTimeout

func (s *HttpServerSettingS) GetIdleTimeout() time.Duration

func (*HttpServerSettingS) GetReadTimeout

func (s *HttpServerSettingS) GetReadTimeout() time.Duration

func (*HttpServerSettingS) GetWriteTimeout

func (s *HttpServerSettingS) GetWriteTimeout() time.Duration

func (*HttpServerSettingS) SetAddr

func (s *HttpServerSettingS) SetAddr(addr string)

type JwtSettingS

type JwtSettingS struct {
	Secret            string
	TokenExpireSecond int
}

type LoggerSettingS

type LoggerSettingS struct {
	RootPath string
	Level    string
}

type MongoDBSettingS

type MongoDBSettingS struct {
	Uri         string
	Username    string
	Password    string
	Database    string
	AuthSource  string
	MaxPoolSize int
	MinPoolSize int
}

type MysqlSettingS

type MysqlSettingS struct {
	Host              string
	UserName          string
	Password          string
	DBName            string
	Charset           string
	MaxIdle           int
	MaxOpen           int
	Loc               string
	ConnMaxLifeSecond int
	MultiStatements   bool
	ParseTime         bool
	ConnectionTimeout string // time unit eg: 2h 3s
	WriteTimeout      string // time unit eg: 2h 3s
	ReadTimeout       string // time unit eg: 2h 3s
	// only app use
	LoggerLevel string
	Environment string
	Logger      log.LoggerContextIface
}

MysqlSettingS defines for connecting mysql.

type QueueAMQPSettingS

type QueueAMQPSettingS struct {
	Broker           string
	DefaultQueue     string
	ResultBackend    string
	ResultsExpireIn  int
	Exchange         string
	ExchangeType     string
	BindingKey       string
	PrefetchCount    int
	TaskRetryCount   int
	TaskRetryTimeout int
	DisableConsume   bool
}

type QueueAliAMQPSettingS

type QueueAliAMQPSettingS struct {
	AccessKey        string
	SecretKey        string
	AliUid           int
	EndPoint         string
	VHost            string
	DefaultQueue     string
	ResultBackend    string
	ResultsExpireIn  int
	Exchange         string
	ExchangeType     string
	BindingKey       string
	PrefetchCount    int
	TaskRetryCount   int
	TaskRetryTimeout int
	DisableConsume   bool
}

QueueAliAMQPSettingS defines for ali yun AMQP queue

type QueueRedisSettingS

type QueueRedisSettingS struct {
	Broker           string
	DefaultQueue     string
	ResultBackend    string
	ResultsExpireIn  int
	DisableConsume   bool
	TaskRetryCount   int
	TaskRetryTimeout int
}

QueueRedisSettingS defines for redis queue.

type QueueServerSettingS

type QueueServerSettingS struct {
	WorkerConcurrency int
	CustomQueueList   []string
}

QueueServerSettingS defines what queue server needs.

type RPCAuthSettingS

type RPCAuthSettingS struct {
	Token             string
	ExpireSecond      int
	TransportSecurity bool
}

type RPCClientKeepaliveParamsS

type RPCClientKeepaliveParamsS struct {
	PingServerIntervalTime int64
	PermitWithoutStream    bool
}

type RPCRateLimitSettingS

type RPCRateLimitSettingS struct {
	MaxConcurrent int
}

type RPCServerKeepaliveEnforcementPolicyS

type RPCServerKeepaliveEnforcementPolicyS struct {
	ClientMinIntervalTime int64
	PermitWithoutStream   bool
}

type RPCServerKeepaliveParamsS

type RPCServerKeepaliveParamsS struct {
	PingClientIntervalTime int64
	MaxConnectionIdle      int64
}

type RPCServerParamsS

type RPCServerParamsS struct {
	NumServerWorkers             int64
	ConnectionTimeout            int64 // unit second
	DisableClientDialHealthCheck bool
	DisableHealthServer          bool
}

type RPCTransportBufferS

type RPCTransportBufferS struct {
	ServerReadBufSizeKB  int
	ServerWriteBufSizeKB int
	ClientReadBufSizeKB  int
	ClientWriteBufSizeKB int
}

type RedisSettingS

type RedisSettingS struct {
	Host           string
	Password       string
	MaxIdle        int
	MaxActive      int
	IdleTimeout    int // unit second
	ConnectTimeout int // unit second
	ReadTimeout    int // unit second
	WriteTimeout   int // unit second
	DB             int
}

RedisSettingS defines for connecting redis.

type ServerSettingS

type ServerSettingS struct {
	AppName     string
	PIDFile     string
	Environment string
}

ServerSettingS defines for server.

Jump to

Keyboard shortcuts

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