go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/status Index | Files

package status

import "gopkg.in/src-d/go-vitess.v1/vt/status"

Package status defines a few useful functions for our binaries, mainly to link the status page with a vtctld instance.

Index

Package Files

status.go

Variables

var StatusFuncs = template.FuncMap{
    "github_com_vitessio_vitess_vtctld_keyspace":     VtctldKeyspace,
    "github_com_vitessio_vitess_vtctld_shard":        VtctldShard,
    "github_com_vitessio_vitess_vtctld_srv_cell":     VtctldSrvCell,
    "github_com_vitessio_vitess_vtctld_srv_keyspace": VtctldSrvKeyspace,
    "github_com_vitessio_vitess_vtctld_replication":  VtctldReplication,
    "github_com_vitessio_vitess_vtctld_tablet":       VtctldTablet,
}

StatusFuncs returns a FuncMap that contains all of our methods here. It is exported so tests can use them.

func MakeVtctldRedirect Uses

func MakeVtctldRedirect(text string, q map[string]string) template.HTML

MakeVtctldRedirect returns an absolute vtctld url that will redirect to the page for the topology object specified in q.

func VtctldKeyspace Uses

func VtctldKeyspace(keyspace string) template.HTML

VtctldKeyspace returns the keyspace name, possibly linked to the keyspace page in vtctld.

func VtctldLink(text, urlPath string) template.HTML

VtctldLink returns the HTML to display a link to the fully qualified vtctld url whose path is given as parameter. If no vtctld_addr flag was passed in, we just return the text with no link.

func VtctldReplication Uses

func VtctldReplication(cell, keyspace, shard string) template.HTML

VtctldReplication returns 'cell/keyspace/shard', possibly linked to the ShardReplication page in vtctld.

func VtctldShard Uses

func VtctldShard(keyspace, shard string) template.HTML

VtctldShard returns the shard name, possibly linked to the shard page in vtctld.

func VtctldSrvCell Uses

func VtctldSrvCell(cell string) template.HTML

VtctldSrvCell returns the cell name, possibly linked to the serving graph page in vtctld for that page.

func VtctldSrvKeyspace Uses

func VtctldSrvKeyspace(cell, keyspace string) template.HTML

VtctldSrvKeyspace returns the keyspace name, possibly linked to the SrvKeyspace page in vtctld.

func VtctldTablet Uses

func VtctldTablet(aliasName string) template.HTML

VtctldTablet returns the tablet alias, possibly linked to the Tablet page in vtctld.

Package status imports 6 packages (graph). Updated 2019-06-13. Refresh now. Tools for package owners.