config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AppId   string
	AuthURL string         `json:"AuthURL"`
	Timeout xtime.Duration `json:",default=5s"`
}

type Backoff

type Backoff struct {
	MaxDelay  int32   `json:",default=300"`
	BaseDelay int32   `json:",default=3"`
	Factor    float32 `json:",default=1.8"`
	Jitter    float32 `json:",default=1.3"`
}

Backoff message.

type Config

type Config struct {
	zrpc.RpcServerConf
	CometRPC zrpc.RpcClientConf
	RedisDB  Redis
	Producer xkafka.ProducerConfig
	Apps     []*App
	Node     Node
	Backoff  Backoff
	Zlog     xlog.Config
}

type Node

type Node struct {
	HeartbeatMax int            `json:",default=2"`
	Heartbeat    xtime.Duration `json:",default=4m"`
}

Node node config.

type Redis

type Redis struct {
	Network      string `json:",default=tcp"`
	Addr         string
	Auth         string        `json:",optional"`
	Active       int           `json:",default=60000"`
	Idle         int           `json:",default=1024"`
	DialTimeout  time.Duration `json:",default=200ms"`
	ReadTimeout  time.Duration `json:",default=500ms"`
	WriteTimeout time.Duration `json:",default=500ms"`
	IdleTimeout  time.Duration `json:",default=120s"`
	Expire       time.Duration `json:",default=30m"`
}

Jump to

Keyboard shortcuts

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