Documentation
¶
Index ¶
- Constants
- func InitMgr(etcdClient *etcd.Client)
- func InitNode(etcdClient *etcd.Client)
- func NewEtcdClientFromYaml() (*etcd.Client, error)
- func NewKey(service string, version string) string
- func PullCtrl() interface{}
- func SyncNode(service, version string, cfg Config)
- type Config
- type ConfigKV
- type Node
- type Nodes
Constants ¶
View Source
const (
// KEY_PREFIX the prifix of config data key in etcd
KEY_PREFIX = "MICRO-CONF"
)
Variables ¶
This section is empty.
Functions ¶
func NewEtcdClientFromYaml ¶
NewEtcdClientFromYaml uses config/etcd.yaml to create a etcd client.
func NewKey ¶
NewKey creates a config data key Note: service and version can not contant "@"!
Types ¶
type Config ¶
type Config interface { UnmarshalJSON([]byte) error MarshalJSON() ([]byte, error) Reload([]byte) error }
Config config interface
type Node ¶
type Node struct { // Config string Config string `json:"config"` // Is it initialized? Initialized bool `json:"initialized"` // contains filtered or unexported fields }
Node config node handler
type Nodes ¶
type Nodes struct {
// contains filtered or unexported fields
}
Nodes config node handlers
Click to show internal directories.
Click to hide internal directories.