cmd

package
v0.0.0-...-3f9d8a4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "akka-cluster-manager",
	Short: "A wrapper around the actual akka-cluster command.",
	Long: `A wrapper around the actual akka-cluster command.

	Instead of passing the node-hostname, JMX port over the command line.
	This wrapper will read those values from a config(.INI) file.`,
}

RootCmd - This represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetNodeURL

func GetNodeURL(node string, port string) string

GetNodeURL - Takes in a passed node and returns the node URL to be used for akka-cluster

func GetOtherNodeURL

func GetOtherNodeURL(node string) string

GetOtherNodeURL - Takes a node and then returns the other node URL in the cluster.

func ParseINI

func ParseINI(filename string) *ini.File

ParseINI - To parse the INI file and return the config.

Types

type Member

type Member struct {
	Address string   `json:"address"`
	Status  string   `json:"status"`
	Roles   []string `json:"roles"`
}

Member struct - which will be used to match against cluster-status output.

type Status

type Status struct {
	Selfaddress string   `json:"self-address"`
	Members     []Member `json:"members"`
	Unreachable []string `json:"unreachable"`
}

Status struct - which will be used to match againstthe cluster-status output.

Jump to

Keyboard shortcuts

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