Documentation ¶
Index ¶
- Variables
- func GetAdminUIPort(connPort int) int
- func Install(c *SyncedCluster, args []string) error
- func ListNodes(s string, total int) ([]int, error)
- func SortedCmds() []string
- func StageCockroachRelease(c *SyncedCluster, version string) error
- func StageRemoteBinary(c *SyncedCluster, applicationName, binaryPath, SHA string) error
- func VersionSatifies(v *version.Version, constraintString string) bool
- type Cassandra
- func (Cassandra) LogDir(c *SyncedCluster, index int) string
- func (Cassandra) NodeDir(c *SyncedCluster, index int) string
- func (Cassandra) NodePort(c *SyncedCluster, index int) int
- func (Cassandra) NodeUIPort(c *SyncedCluster, index int) int
- func (Cassandra) NodeURL(_ *SyncedCluster, host string, port int) string
- func (Cassandra) Start(c *SyncedCluster, extraArgs []string)
- type ClusterImpl
- type Cockroach
- func (Cockroach) LogDir(c *SyncedCluster, index int) string
- func (Cockroach) NodeDir(c *SyncedCluster, index int) string
- func (Cockroach) NodePort(c *SyncedCluster, index int) int
- func (cr Cockroach) NodeUIPort(c *SyncedCluster, index int) int
- func (Cockroach) NodeURL(c *SyncedCluster, host string, port int) string
- func (r Cockroach) SQL(c *SyncedCluster, args []string) error
- func (r Cockroach) Start(c *SyncedCluster, extraArgs []string)
- type SyncedCluster
- func (c *SyncedCluster) CockroachVersions() map[string]int
- func (c *SyncedCluster) Get(src, dest string)
- func (c *SyncedCluster) GetInternalIP(index int) (string, error)
- func (c *SyncedCluster) IsLocal() bool
- func (c *SyncedCluster) Monitor() chan nodeMonitorInfo
- func (c *SyncedCluster) Parallel(display string, count, concurrency int, fn func(i int) ([]byte, error))
- func (c *SyncedCluster) Put(src, dest string)
- func (c *SyncedCluster) Run(stdout, stderr io.Writer, nodes []int, title, cmd string) error
- func (c *SyncedCluster) RunLoad(cmd string, stdout, stderr io.Writer) error
- func (c *SyncedCluster) ServerNodes() []int
- func (c *SyncedCluster) SetupSSH() error
- func (c *SyncedCluster) Ssh(sshArgs, args []string) error
- func (c *SyncedCluster) Start()
- func (c *SyncedCluster) Status()
- func (c *SyncedCluster) Stop(sig int, wait bool)
- func (c *SyncedCluster) Wait() error
- func (c *SyncedCluster) Wipe()
Constants ¶
This section is empty.
Variables ¶
var Clusters = map[string]*SyncedCluster{}
Memoizes cluster info for install operations
var StartOpts struct { Encrypt bool Sequential bool }
Functions ¶
func GetAdminUIPort ¶
func Install ¶
func Install(c *SyncedCluster, args []string) error
func SortedCmds ¶
func SortedCmds() []string
func StageCockroachRelease ¶
func StageCockroachRelease(c *SyncedCluster, version string) error
StageCockroachRelease downloads an official CockroachDB release binary with the specified version.
func StageRemoteBinary ¶
func StageRemoteBinary(c *SyncedCluster, applicationName, binaryPath, SHA string) error
StageRemoteBinary downloads a cockroach edge binary with the provided application path to each specified by the cluster. If no SHA is specified, the latest build of the binary is used instead.
func VersionSatifies ¶
Types ¶
type Cassandra ¶
type Cassandra struct{}
func (Cassandra) NodeUIPort ¶
func (Cassandra) NodeUIPort(c *SyncedCluster, index int) int
func (Cassandra) Start ¶
func (Cassandra) Start(c *SyncedCluster, extraArgs []string)
type ClusterImpl ¶
type ClusterImpl interface { Start(c *SyncedCluster, extraArgs []string) NodeDir(c *SyncedCluster, index int) string LogDir(c *SyncedCluster, index int) string NodeURL(c *SyncedCluster, host string, port int) string NodePort(c *SyncedCluster, index int) int NodeUIPort(c *SyncedCluster, index int) int }
type Cockroach ¶
type Cockroach struct{}
func (Cockroach) NodeUIPort ¶
func (cr Cockroach) NodeUIPort(c *SyncedCluster, index int) int
func (Cockroach) Start ¶
func (r Cockroach) Start(c *SyncedCluster, extraArgs []string)
type SyncedCluster ¶
type SyncedCluster struct { // name, vms, users, localities are populated at init time. Name string VMs []string Users []string Localities []string VPCs []string // all other fields are populated in newCluster. Nodes []int LoadGen int Secure bool Env string Args []string Tag string Impl ClusterImpl UseTreeDist bool Quiet bool }
A SyncedCluster is created from the information in the synced hosts file and is used as the target for installing and managing various software components.
TODO(benesch): unify with CloudCluster.
func (*SyncedCluster) CockroachVersions ¶
func (c *SyncedCluster) CockroachVersions() map[string]int
func (*SyncedCluster) Get ¶
func (c *SyncedCluster) Get(src, dest string)
func (*SyncedCluster) GetInternalIP ¶
func (c *SyncedCluster) GetInternalIP(index int) (string, error)
GetInternalIP returns the internal IP address of the specified node.
func (*SyncedCluster) IsLocal ¶
func (c *SyncedCluster) IsLocal() bool
TODO(tschottdorf): roachprod should cleanly encapsulate the home directory which is currently the biggest culprit for awkward one-offs.
func (*SyncedCluster) Monitor ¶
func (c *SyncedCluster) Monitor() chan nodeMonitorInfo
func (*SyncedCluster) Put ¶
func (c *SyncedCluster) Put(src, dest string)
func (*SyncedCluster) RunLoad ¶
func (c *SyncedCluster) RunLoad(cmd string, stdout, stderr io.Writer) error
func (*SyncedCluster) ServerNodes ¶
func (c *SyncedCluster) ServerNodes() []int
func (*SyncedCluster) SetupSSH ¶
func (c *SyncedCluster) SetupSSH() error
func (*SyncedCluster) Ssh ¶
func (c *SyncedCluster) Ssh(sshArgs, args []string) error
func (*SyncedCluster) Start ¶
func (c *SyncedCluster) Start()
func (*SyncedCluster) Status ¶
func (c *SyncedCluster) Status()
func (*SyncedCluster) Stop ¶
func (c *SyncedCluster) Stop(sig int, wait bool)
func (*SyncedCluster) Wait ¶
func (c *SyncedCluster) Wait() error
func (*SyncedCluster) Wipe ¶
func (c *SyncedCluster) Wipe()