setting

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 21

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 added in v1.6.3

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 added in v1.2.4

type GPoolSettingS struct {
	WorkerNum  int
	JobChanLen int
}

type HttpRateLimitSettingS added in v1.5.13

type HttpRateLimitSettingS struct {
	MaxConcurrent int
}

type HttpServerSettingS added in v1.5.11

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

func (*HttpServerSettingS) GetAddr added in v1.5.11

func (s *HttpServerSettingS) GetAddr() string

func (*HttpServerSettingS) GetIdleTimeout added in v1.5.11

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

func (*HttpServerSettingS) GetReadTimeout added in v1.5.11

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

func (*HttpServerSettingS) GetWriteTimeout added in v1.5.11

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

func (*HttpServerSettingS) SetAddr added in v1.5.11

func (s *HttpServerSettingS) SetAddr(addr string)

type JwtSettingS added in v1.5.9

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
	InterpolateParams 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
	SQLProxy    string
}

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 added in v1.4.2

type RPCAuthSettingS struct {
	Token             string
	ExpireSecond      int
	TransportSecurity bool
}

type RPCClientKeepaliveParamsS added in v1.5.1

type RPCClientKeepaliveParamsS struct {
	PingServerIntervalTime int64
	PermitWithoutStream    bool
}

type RPCRateLimitSettingS added in v1.5.13

type RPCRateLimitSettingS struct {
	MaxConcurrent int
}

type RPCServerKeepaliveEnforcementPolicyS added in v1.5.1

type RPCServerKeepaliveEnforcementPolicyS struct {
	ClientMinIntervalTime int64
	PermitWithoutStream   bool
}

type RPCServerKeepaliveParamsS added in v1.5.1

type RPCServerKeepaliveParamsS struct {
	PingClientIntervalTime int64
	MaxConnectionIdle      int64
}

type RPCServerParamsS added in v1.5.5

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

type RPCTransportBufferS added in v1.5.1

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.

type TransactionSeataSettingS added in v1.6.4

type TransactionSeataSettingS struct {
	Enable   bool
	ConfFile string
	ATModel  bool
	XAModel  bool
}

Jump to

Keyboard shortcuts

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