config

package
v0.0.0-...-40c35e2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MongodBKey master mongodb key
	MongodBKey = "mongodb_cluster1"
)

Functions

func EtcdRawGetValue

func EtcdRawGetValue(key string) (string, error)

EtcdRawGetValue get raw or unmarshalled value from etcd cluster

func GetKV

func GetKV(key string) (string, error)

GetKV get k/v pair

func HostIPAddress

func HostIPAddress(hostname string) string

HostIPAddress get host ipaddress

func HostName

func HostName() string

HostName get serverhostname

func PutValue

func PutValue(key, value string)

PutValue put/save k/v to consul

func RegisterServer

func RegisterServer()

RegisterServer to consul

func ScanCurrentUpstream

func ScanCurrentUpstream() string

ScanCurrentUpstream scan current registered upstream if self is registered

func StartConsul

func StartConsul()

StartConsul app session start for consul

func StartEtcd

func StartEtcd()

StartEtcd beginning connection

Types

type EtcdResponse

type EtcdResponse struct {
	Action string `json:"action"`
	Node   struct {
		CreatedIndex  float64 `json:"createdIndex"`
		Key           string  `json:"key"`
		ModifiedIndex float64 `json:"modifiedIndex"`
		Value         string  `json:"value"`
	} `json:"node"`
}

EtcdResponse struct data from etcd response

Jump to

Keyboard shortcuts

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