etcdutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2013 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright (c) 2013 Kelsey Hightower. All rights reserved. Use of this source code is governed by the Apache License, Version 2.0 that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValues

func GetValues(c EtcdClient, prefix string, keys []string) (map[string]interface{}, error)

GetValues queries etcd for keys prefixed by prefix. Etcd paths (keys) are translated into names more suitable for use in templates. For example if prefix where set to '/production' and one of the keys where '/nginx/port'; the prefixed '/production/nginx/port' key would be quired for. If the value for the prefixed key where 80, the returned map would contain the entry vars["nginx_port"] = "80".

func NewEtcdClient

func NewEtcdClient(machines []string, cert, key string) (*etcd.Client, error)

NewEtcdClient returns an *etcd.Client with a connection to named machines. It returns an error if a connection to the cluster cannot be made.

Types

type EtcdClient

type EtcdClient interface {
	Get(key string) ([]*etcd.Response, error)
}

Jump to

Keyboard shortcuts

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