etcdutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2014 License: MIT Imports: 3 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 were set to '/production' and one of the keys were '/nginx/port'; the prefixed '/production/nginx/port' key would be queried 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, caCert 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, sort bool, recursive bool) (*etcd.Response, error)
}

Jump to

Keyboard shortcuts

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