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

package helpers

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

Package helpers contains a few utility classes to handle topo.Server objects, and transitions from one topo implementation to another.

Package helpers contains a few utility classes to handle topo.Server objects, and transitions from one topo implementation to another.

Index

Package Files

compare.go copy.go tee.go

func CompareKeyspaces Uses

func CompareKeyspaces(ctx context.Context, fromTS, toTS *topo.Server) error

CompareKeyspaces will compare the keyspaces in the destination topo.

func CompareRoutingRules Uses

func CompareRoutingRules(ctx context.Context, fromTS, toTS *topo.Server) error

CompareRoutingRules will compare the routing rules in the destination topo.

func CompareShardReplications Uses

func CompareShardReplications(ctx context.Context, fromTS, toTS *topo.Server) error

CompareShardReplications will compare the ShardReplication objects in the destination topo.

func CompareShards Uses

func CompareShards(ctx context.Context, fromTS, toTS *topo.Server) error

CompareShards will compare the shards in the destination topo.

func CompareTablets Uses

func CompareTablets(ctx context.Context, fromTS, toTS *topo.Server) error

CompareTablets will compare the tablets in the destination topo.

func CopyKeyspaces Uses

func CopyKeyspaces(ctx context.Context, fromTS, toTS *topo.Server)

CopyKeyspaces will create the keyspaces in the destination topo.

func CopyRoutingRules Uses

func CopyRoutingRules(ctx context.Context, fromTS, toTS *topo.Server)

CopyRoutingRules will create the routing rules in the destination topo.

func CopyShardReplications Uses

func CopyShardReplications(ctx context.Context, fromTS, toTS *topo.Server)

CopyShardReplications will create the ShardReplication objects in the destination topo.

func CopyShards Uses

func CopyShards(ctx context.Context, fromTS, toTS *topo.Server)

CopyShards will create the shards in the destination topo.

func CopyTablets Uses

func CopyTablets(ctx context.Context, fromTS, toTS *topo.Server)

CopyTablets will create the tablets in the destination topo.

func NewTee Uses

func NewTee(primary, secondary *topo.Server, reverseLockOrder bool) (*topo.Server, error)

NewTee returns a new topo.Server object. It uses a TeeFactory.

type TeeConn Uses

type TeeConn struct {
    // contains filtered or unexported fields
}

TeeConn implements the topo.Conn interface.

func (*TeeConn) Close Uses

func (c *TeeConn) Close()

Close is part of the topo.Conn interface.

func (*TeeConn) Create Uses

func (c *TeeConn) Create(ctx context.Context, filePath string, contents []byte) (topo.Version, error)

Create is part of the topo.Conn interface.

func (*TeeConn) Delete Uses

func (c *TeeConn) Delete(ctx context.Context, filePath string, version topo.Version) error

Delete is part of the topo.Conn interface.

func (*TeeConn) Get Uses

func (c *TeeConn) Get(ctx context.Context, filePath string) ([]byte, topo.Version, error)

Get is part of the topo.Conn interface.

func (*TeeConn) ListDir Uses

func (c *TeeConn) ListDir(ctx context.Context, dirPath string, full bool) ([]topo.DirEntry, error)

ListDir is part of the topo.Conn interface.

func (*TeeConn) Lock Uses

func (c *TeeConn) Lock(ctx context.Context, dirPath, contents string) (topo.LockDescriptor, error)

Lock is part of the topo.Conn interface.

func (*TeeConn) NewMasterParticipation Uses

func (c *TeeConn) NewMasterParticipation(name, id string) (topo.MasterParticipation, error)

NewMasterParticipation is part of the topo.Conn interface.

func (*TeeConn) Update Uses

func (c *TeeConn) Update(ctx context.Context, filePath string, contents []byte, version topo.Version) (topo.Version, error)

Update is part of the topo.Conn interface.

func (*TeeConn) Watch Uses

func (c *TeeConn) Watch(ctx context.Context, filePath string) (*topo.WatchData, <-chan *topo.WatchData, topo.CancelFunc)

Watch is part of the topo.Conn interface

type TeeFactory Uses

type TeeFactory struct {
    // contains filtered or unexported fields
}

TeeFactory is an implementation of topo.Factory that uses a primary underlying topo.Server for all changes, but also duplicates the changes to a secondary topo.Server. It also locks both topo servers when needed. It is meant to be used during transitions from one topo.Server to another.

- primary: we read everything from it, and write to it. We also create

MasterParticipation from it.

- secondary: we write to it as well, but we usually don't fail. - we lock primary/secondary if reverseLockOrder is False, or secondary/primary if reverseLockOrder is True.

func (*TeeFactory) Create Uses

func (f *TeeFactory) Create(cell, serverAddr, root string) (topo.Conn, error)

Create is part of the topo.Factory interface.

func (*TeeFactory) HasGlobalReadOnlyCell Uses

func (f *TeeFactory) HasGlobalReadOnlyCell(serverAddr, root string) bool

HasGlobalReadOnlyCell is part of the topo.Factory interface.

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