示例#1
0
文件: init.go 项目: zhgo/solr
func init() {
	var c conf

	// Load config file
	replaces := map[string]string{"{WorkingDir}": config.WorkingDir()}
	config.NewConfig("zhgo.json").Replace(replaces).Parse(c)

	pool = c.Solr
}
示例#2
0
文件: main.go 项目: liudng/app
func main() {
	// New http application
	app := biz.HttpApp{}

	// Load config file
	replaces := map[string]string{"{WorkingDir}": config.WorkingDir()}
	config.NewConfig("soe-http.json").Replace(replaces).Parse(&app)

	// Start http server.
	app.Load()
	app.LoadMuxList()
	app.Start()

	// Start tcp server.
	// TODO

	// Start jobs.
	// TODO
}
示例#3
0
package main

import (
	"fmt"
	"github.com/zhgo/config"
	"github.com/zhgo/db"
	"log"
	"math/rand"
	"os"
	"path/filepath"
	"time"
)

var WorkingDir string = config.WorkingDir()

type Migration struct {
	db            *db.Server
	rows          []map[string]interface{}
	fsql          *os.File
	DSN           string `json:"dsn"`
	Module        string `json:"module"`
	TableName     string `json:"table_name"`
	Primary       string `json:"primary"`
	SrcColumn     string `json:"src_column"`
	SrcPathPrefix string `json:"src_path_prefix"`
	DstBktColumn  string `json:"dst_bkt_column"`
	DstBktValue   string `json:"dst_bkt_value"`
	DstKeyColumn  string `json:"dst_key_column"`
	NfsSrcDir     string `json:"nfs_src_dir"`
	MigAdpDir     string `json:"mig_adp_dir"`
}