conf

package
v0.0.0-...-c242be3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommConf

type CommConf struct {
	Ver     string
	LogPath string
}

type ConfDiscovery

type ConfDiscovery struct {
	Role     string
	Interval xtime.Duration
}

type ES

type ES struct {
	Addrs string
}

type Etcd

type Etcd struct {
	Name    string
	Root    string
	Addrs   []string
	Timeout xtime.Duration
}

type HTTPClient

type HTTPClient struct {
	Dial      xtime.Duration
	Timeout   xtime.Duration
	KeepAlive xtime.Duration
	Timer     int
}

HTTPClient http client settings.

type HTTPServer

type HTTPServer struct {
	Addrs        []string
	MaxListen    int32
	ReadTimeout  xtime.Duration
	WriteTimeout xtime.Duration
}

=================================== HTTP ================================== HTTPServer http server settings.

type KafkaConsumer

type KafkaConsumer struct {
	Group     string
	Topics    []string
	Offset    bool // true: new, false: old
	Zookeeper *Zookeeper
}

KafkaConsumer kafka client settings.

type KafkaProducer

type KafkaProducer struct {
	Zookeeper *Zookeeper
	Brokers   []string
	Sync      bool // true: sync, false: async
}

KafkaProducer kafka producer settings.

type MongoDB

type MongoDB struct {
	Addrs       string
	DB          string
	DialTimeout xtime.Duration
}

type MultiHTTP

type MultiHTTP struct {
	Outer *HTTPServer
	Inner *HTTPServer
	Local *HTTPServer
}

MultiHttp outer/inner/local http server settings.

type MySQL

type MySQL struct {
	Name   string // for trace
	DSN    string // data source name
	Active int    // pool
	Idle   int    // pool
}

type RPCServer

type RPCServer struct {
	Proto string
	Addr  string
}

type Redis

type Redis struct {
	Name         string // redis name, for trace
	Proto        string
	Addr         string
	Active       int // pool
	Idle         int // pool
	DialTimeout  xtime.Duration
	ReadTimeout  xtime.Duration
	WriteTimeout xtime.Duration
	IdleTimeout  xtime.Duration
}

Redis client settings.

type Server

type Server struct {
	Proto string
	Addr  string
}

type ServiceDiscoveryClient

type ServiceDiscoveryClient struct {
	ServiceName string
	EtcdAddr    string
	Balancer    string
}

type ServiceDiscoveryServer

type ServiceDiscoveryServer struct {
	ServiceName string
	RPCAddr     string
	EtcdAddr    string
	Interval    xtime.Duration
	TTL         xtime.Duration
}

type Zookeeper

type Zookeeper struct {
	Root    string
	Addrs   []string
	Timeout xtime.Duration
}

Jump to

Keyboard shortcuts

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