Added documentation to all exported functions and structs. Re-wrote some of the documentation to point to more up to date sources. Made some structures and functions that were needlessly exported unexported.

This commit is contained in:
Renan DelValle 2019-06-11 15:19:53 -07:00
parent b62ff3e182
commit 587e017a9a
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
15 changed files with 256 additions and 183 deletions

View file

@ -21,6 +21,8 @@ import (
"github.com/pkg/errors"
)
// Cluster contains the definition of the clusters.json file used by the default Aurora
// client for configuration
type Cluster struct {
Name string `json:"name"`
AgentRoot string `json:"slave_root"`
@ -33,7 +35,8 @@ type Cluster struct {
AuthMechanism string `json:"auth_mechanism"`
}
// Loads clusters.json file traditionally located at /etc/aurora/clusters.json
// LoadClusters loads clusters.json file traditionally located at /etc/aurora/clusters.json
// for use with a gorealis client
func LoadClusters(config string) (map[string]Cluster, error) {
file, err := os.Open(config)