command

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2014 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RPCAddrFlag

func RPCAddrFlag(f *flag.FlagSet) *string

RPCAddrFlag returns a pointer to a string that will be populated when the given flagset is parsed with the RPC address of the Serf.

func RPCAuthFlag added in v0.5.0

func RPCAuthFlag(f *flag.FlagSet) *string

RPCAuthFlag returns a pointer to a string that will be populated when the given flagset is parsed with the RPC auth token of the Serf.

func RPCClient

func RPCClient(addr, auth string) (*client.RPCClient, error)

RPCClient returns a new Serf RPC client with the given address.

Types

type EventCommand

type EventCommand struct {
	Ui cli.Ui
}

EventCommand is a Command implementation that queries a running Serf agent what members are part of the cluster currently.

func (*EventCommand) Help

func (c *EventCommand) Help() string

func (*EventCommand) Run

func (c *EventCommand) Run(args []string) int

func (*EventCommand) Synopsis

func (c *EventCommand) Synopsis() string

type ForceLeaveCommand added in v0.2.0

type ForceLeaveCommand struct {
	Ui cli.Ui
}

ForceLeaveCommand is a Command implementation that tells a running Serf to force a member to enter the "left" state.

func (*ForceLeaveCommand) Help added in v0.2.0

func (c *ForceLeaveCommand) Help() string

func (*ForceLeaveCommand) Run added in v0.2.0

func (c *ForceLeaveCommand) Run(args []string) int

func (*ForceLeaveCommand) Synopsis added in v0.2.0

func (c *ForceLeaveCommand) Synopsis() string

type InfoCommand added in v0.6.0

type InfoCommand struct {
	Ui cli.Ui
}

InfoCommand is a Command implementation that queries a running Serf agent for various debugging statistics for operators

func (*InfoCommand) Help added in v0.6.0

func (i *InfoCommand) Help() string

func (*InfoCommand) Run added in v0.6.0

func (i *InfoCommand) Run(args []string) int

func (*InfoCommand) Synopsis added in v0.6.0

func (i *InfoCommand) Synopsis() string

type JoinCommand

type JoinCommand struct {
	Ui cli.Ui
}

JoinCommand is a Command implementation that tells a running Serf agent to join another.

func (*JoinCommand) Help

func (c *JoinCommand) Help() string

func (*JoinCommand) Run

func (c *JoinCommand) Run(args []string) int

func (*JoinCommand) Synopsis

func (c *JoinCommand) Synopsis() string

type KeygenCommand added in v0.2.0

type KeygenCommand struct {
	Ui cli.Ui
}

KeygenCommand is a Command implementation that generates an encryption key for use in `serf agent`.

func (*KeygenCommand) Help added in v0.2.0

func (c *KeygenCommand) Help() string

func (*KeygenCommand) Run added in v0.2.0

func (c *KeygenCommand) Run(_ []string) int

func (*KeygenCommand) Synopsis added in v0.2.0

func (c *KeygenCommand) Synopsis() string

type KeysCommand added in v0.6.0

type KeysCommand struct {
	Ui cli.Ui
}

func (*KeysCommand) Help added in v0.6.0

func (c *KeysCommand) Help() string

func (*KeysCommand) Run added in v0.6.0

func (c *KeysCommand) Run(args []string) int

func (*KeysCommand) Synopsis added in v0.6.0

func (c *KeysCommand) Synopsis() string

type LeaveCommand added in v0.3.0

type LeaveCommand struct {
	Ui cli.Ui
}

LeaveCommand is a Command implementation that instructs the Serf agent to gracefully leave the cluster

func (*LeaveCommand) Help added in v0.3.0

func (c *LeaveCommand) Help() string

func (*LeaveCommand) Run added in v0.3.0

func (c *LeaveCommand) Run(args []string) int

func (*LeaveCommand) Synopsis added in v0.3.0

func (c *LeaveCommand) Synopsis() string

type Member added in v0.4.0

type Member struct {
	Name   string            `json:"name"`
	Addr   string            `json:"addr"`
	Port   uint16            `json:"port"`
	Tags   map[string]string `json:"tags"`
	Status string            `json:"status"`
	Proto  map[string]uint8  `json:"protocol"`
	// contains filtered or unexported fields
}

A container of member details. Maintaining a command-specific struct here makes sense so that the agent.Member struct can evolve without changing the keys in the output interface.

type MemberContainer added in v0.4.0

type MemberContainer struct {
	Members []Member `json:"members"`
}

func (MemberContainer) String added in v0.4.0

func (c MemberContainer) String() string

type MembersCommand

type MembersCommand struct {
	Ui cli.Ui
}

MembersCommand is a Command implementation that queries a running Serf agent what members are part of the cluster currently.

func (*MembersCommand) Help

func (c *MembersCommand) Help() string

func (*MembersCommand) Run

func (c *MembersCommand) Run(args []string) int

func (*MembersCommand) Synopsis

func (c *MembersCommand) Synopsis() string

type MonitorCommand

type MonitorCommand struct {
	ShutdownCh <-chan struct{}
	Ui         cli.Ui
	// contains filtered or unexported fields
}

MonitorCommand is a Command implementation that queries a running Serf agent what members are part of the cluster currently.

func (*MonitorCommand) Help

func (c *MonitorCommand) Help() string

func (*MonitorCommand) Run

func (c *MonitorCommand) Run(args []string) int

func (*MonitorCommand) Synopsis

func (c *MonitorCommand) Synopsis() string

type QueryCommand added in v0.5.0

type QueryCommand struct {
	ShutdownCh <-chan struct{}
	Ui         cli.Ui
}

QueryCommand is a Command implementation that is used to trigger a new query and wait for responses and acks

func (*QueryCommand) Help added in v0.5.0

func (c *QueryCommand) Help() string

func (*QueryCommand) Run added in v0.5.0

func (c *QueryCommand) Run(args []string) int

func (*QueryCommand) Synopsis added in v0.5.0

func (c *QueryCommand) Synopsis() string

type ReachabilityCommand added in v0.5.0

type ReachabilityCommand struct {
	ShutdownCh <-chan struct{}
	Ui         cli.Ui
}

ReachabilityCommand is a Command implementation that is used to trigger a new reachability test

func (*ReachabilityCommand) Help added in v0.5.0

func (c *ReachabilityCommand) Help() string

func (*ReachabilityCommand) Run added in v0.5.0

func (c *ReachabilityCommand) Run(args []string) int

func (*ReachabilityCommand) Synopsis added in v0.5.0

func (c *ReachabilityCommand) Synopsis() string

type StatsContainer added in v0.6.0

type StatsContainer map[string]map[string]string

func (StatsContainer) String added in v0.6.0

func (s StatsContainer) String() string

type TagsCommand added in v0.4.5

type TagsCommand struct {
	Ui cli.Ui
}

TagsCommand is an interface to dynamically add or otherwise modify a running serf agent's tags.

func (*TagsCommand) Help added in v0.4.5

func (c *TagsCommand) Help() string

func (*TagsCommand) Run added in v0.4.5

func (c *TagsCommand) Run(args []string) int

func (*TagsCommand) Synopsis added in v0.4.5

func (c *TagsCommand) Synopsis() string

type VersionCommand

type VersionCommand struct {
	Revision          string
	Version           string
	VersionPrerelease string
	Ui                cli.Ui
}

VersionCommand is a Command implementation prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

func (*VersionCommand) Run

func (c *VersionCommand) Run(_ []string) int

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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