func DefaultConfig() *Config {
	hostname, err := os.Hostname()
	if err != nil {
		log.Errorf(err, "Error determining hostname: %s", err)
		hostname = string(uuid.NewUUID())
	}

	return &Config{
		Mode:    ModeSingle,
		Node:    hostname,
		DataDir: defaultDataDir + hostname,
		Listener: Listener{
			BindAddr: "0.0.0.0:" + strconv.Itoa(defaultBindPort),
			RPCAddr:  "0.0.0.0:" + strconv.Itoa(defaultRPCPort),
			PeerAddr: "127.0.0.1:" + strconv.Itoa(defaultPeerPort),
		},
		Task: Task{
			Kind: "ticker",
			Params: []Label{
				{
					Key:   defaultTaskKey,
					Value: defaultTaskValue,
				},
			},
		},
		Registry: Registry{
			Address: "http://127.0.0.1:30100",
			Plugin:  defaultDCPluginName,
		},
	}
}
// DefaultConfig returns the default config
DefaultConfig returns the default config
// DefaultConfig returns the default config
func DefaultConfig() *Config {
	hostname, err := os.Hostname()
	if err != nil {
		log.Errorf(err, "Error determining hostname: %s", err)
		hostname = string(uuid.NewUUID())
	}
	return &Config{
		Mode:    ModeSingle,
		Node:    hostname,
		DataDir: defaultDataDir + hostname,
		Listener: Listener{
			BindAddr: "0.0.0.0:" + strconv.Itoa(defaultBindPort),
			RPCAddr:  "0.0.0.0:" + strconv.Itoa(defaultRPCPort),
			PeerAddr: "127.0.0.1:" + strconv.Itoa(defaultPeerPort),
		},
		Task: Task{
			Kind: "ticker",
			Params: []Label{
				{
					Key:   defaultTaskKey,
					Value: defaultTaskValue,
				},
			},
		},
		Registry: Registry{
			Address: "http://127.0.0.1:30100",
			Plugin:  defaultDCPluginName,
		},
	}
}
func DefaultConfig ( ) * Config { hostname , err := os . Hostname ( ) if err != nil { log . Errorf ( err , " " , err ) hostname = string ( uuid . NewUUID ( ) ) } return & Config { Mode : ModeSingle , Node : hostname , DataDir : defaultDataDir + hostname , Listener : Listener { BindAddr : " " + strconv . Itoa ( defaultBindPort ) , RPCAddr : " " + strconv . Itoa ( defaultRPCPort ) , PeerAddr : " " + strconv . Itoa ( defaultPeerPort ) , } , Task : Task { Kind : " " , Params : [ ] Label { { Key : defaultTaskKey , Value : defaultTaskValue , } , } , } , Registry : Registry { Address : " " , Plugin : defaultDCPluginName , } , } }
DefaultConfig returns the default config
DefaultConfig returns the default config