config

package
v0.0.0-...-8a7433f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is a built-time-injected variable.
	Version = "0.0.1"
	// ServiceName is the MicroService Name
	ServiceName = "micro.cn.push"
	//StreamServiceName ...
	StreamServiceName = "go.micro.srv.stream"
	//WebsocketPort ...
	WebsocketPort = ":8500"

	//RegisterTTL Time
	RegisterTTL = 30

	//RegisterInterval Time
	RegisterInterval = 10
)
View Source
var (
	DBConfig    Database
	CacheConfig Cache
	MicroConfig MicroSets
)

Config From filea

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Database
}

Cache define our own Cache Config

type Database

type Database struct {
	Address string `toml:"address"`
	Port    int    `toml:"port"`
}

Database define our own Database Config

type MicroSets

type MicroSets struct {
	MicroServerName       string `toml:"microservername"`
	MicroServerAddress    string `toml:"microserveraddress"`
	MicroRegisterTTL      int    `toml:"microregisterttl"`
	MicroRegisterInterval int    `toml:"microregisterinterval"`
}

MicroSets define our own Micro Config

Jump to

Keyboard shortcuts

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