etcdutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 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

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around the etcd client

func NewEtcdClient

func NewEtcdClient(machines []string, cert, key string, caCert string) (*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.

func (*Client) GetValues

func (c *Client) GetValues(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".

type EtcdClient

type EtcdClient interface {
	Get(key string, sort, recurse bool) (*etcd.Response, error)
}

Jump to

Keyboard shortcuts

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