setting

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: BSD-3-Clause Imports: 1 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 GPoolSettingS added in v1.2.4

type GPoolSettingS struct {
	WorkerNum  int
	JobChanLen int
}

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
	LoggerLevel       string
	Environment       string
	ConnectionTimeout string // time unit eg: 2h 3s
	WriteTimeout      string // time unit eg: 2h 3s
	ReadTimeout       string // time unit eg: 2h 3s
}

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
	DisableConsume  bool
}

QueueAliAMQPSettingS defines for ali yun AMQP queue

type QueueRedisSettingS

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

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
	TransportSecurity bool
}

type RPCClientKeepaliveParamsS added in v1.5.1

type RPCClientKeepaliveParamsS struct {
	PingServerIntervalTime int64
	PermitWithoutStream    bool
}

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
	DisableHealthCheck 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
	Network      string
	PIDFile      string
	Environment  string
	ReadTimeout  int
	WriteTimeout int
	IdleTimeout  int
	// contains filtered or unexported fields
}

ServerSettingS defines for grpc server.

func (*ServerSettingS) GetAddr added in v1.5.8

func (s *ServerSettingS) GetAddr() string

func (*ServerSettingS) GetIdleTimeout added in v1.2.8

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

func (*ServerSettingS) GetReadTimeout added in v1.2.8

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

func (*ServerSettingS) GetWriteTimeout added in v1.2.8

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

func (*ServerSettingS) SetAddr added in v1.5.8

func (s *ServerSettingS) SetAddr(addr string)

Jump to

Keyboard shortcuts

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