status

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
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.

Functions

func MakeVtctldRedirect

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

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

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

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

func VtctldShard

func VtctldShard(keyspace, shard string) template.HTML

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

func VtctldSrvCell

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

func VtctldSrvKeyspace(cell, keyspace string) template.HTML

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

func VtctldTablet

func VtctldTablet(aliasName string) template.HTML

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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