config

package
v0.0.0-...-df93b5d Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = new(Config)

Functions

This section is empty.

Types

type Base

type Base struct {
	N         float32       `goconf:"base:N"`
	IP        string        `goconf:"base:ip"`
	Client    string        `goconf:"base:client"`
	CheckTime time.Duration `goconf:"base:checktime"`
	SyncTime  time.Duration `goconf:"base:synctime"`
}

type Config

type Config struct {
	WebApi *WebApi
	Mysql  *MySql
	Redis  *Redis
	Base   *Base
}

func GetConf

func GetConf() *Config

func (*Config) SetBase

func (c *Config) SetBase(b *Base)

func (*Config) SetMysql

func (c *Config) SetMysql(m *MySql)

func (*Config) SetRedis

func (c *Config) SetRedis(r *Redis)

func (*Config) SetWebApi

func (c *Config) SetWebApi(w *WebApi)

type MySql

type MySql struct {
	Host  string `goconf:"mysql:host"`
	User  string `goconf:"mysql:user"`
	Pass  string `goconf:"mysql:pass"`
	Db    string `goconf:"mysql:db"`
	Table string `goconf:"mysql:table"`
}

type Redis

type Redis struct {
	Host string `goconf:"redis:host"`
	Pass string `goconf:"redis:pass"`
	Db   int64  `goconf:"redis:db"`
}

type WebApi

type WebApi struct {
	Url    string `goconf:"webapi:url"`
	Key    string `goconf:"webapi:key"`
	NodeId int    `goconf:"webapi:node_id"`
}

Jump to

Keyboard shortcuts

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