config

package
v0.1.0-alpha-target-23... Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

package config implements configuration data structures and parsing.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnmarshal = errors.New("config: unmarshaling failed")

ErrUnmarshal is returned whenever config unmarshalling

Functions

This section is empty.

Types

type ClusterMemberList

type ClusterMemberList struct {
	Members []httptypes.Member `json:"members"`
}

ClusterMemberList is used for deserializing the responses from the etcd cluster members.

type Node

type Node struct {
	Name       string `json:"name"`
	Host       string `json:"host"`
	RPCPort    uint64 `json:"rpcPort"`
	ClientPort uint64 `json:"clientPort"`
	ReseedPort uint64 `json:"httpPort"`
	Type       string `json:"type"`
	SlaveID    string `json:"slaveID"`
}

Node represents an etcd node's configuration.

func Parse

func Parse(text string) (*Node, error)

Parse attempts to deserialize a config.Node from a byte array.

func (Node) String

func (n Node) String() string

String implements the fmt.Stringer interface, returning a space separated string representation of a Node.

Jump to

Keyboard shortcuts

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