vitess

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCells

func ParseCells(settings config.VitessConfigurationSettings) (cells []string)

ParseCells returns a slice of non-empty Vitess cell names

Types

type Tablet

type Tablet struct {
	Alias         *topodata.TabletAlias `json:"alias,omitempty"`
	MysqlHostname string                `json:"mysql_hostname,omitempty"`
	MysqlPort     int32                 `json:"mysql_port,omitempty"`
	Type          topodata.TabletType   `json:"type,omitempty"`
}

Tablet represents information about a running instance of vttablet.

func ParseTablets

func ParseTablets(settings config.VitessConfigurationSettings) (tablets []Tablet, err error)

ParseTablets reads from vitess /api/keyspace/<keyspace>/tablets/[shard] and returns a listing (mysql_hostname, mysql_port, type) of REPLICA tablets

func (Tablet) HasValidCell

func (t Tablet) HasValidCell(validCells []string) bool

HasValidCell returns a bool reflecting if a tablet is in a valid Vitess cell

func (Tablet) IsValidReplica

func (t Tablet) IsValidReplica() bool

IsValidReplica returns a bool reflecting if a tablet type is REPLICA

Jump to

Keyboard shortcuts

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