faketopo

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package faketopo contains utitlities for tests that have to interact with a Vitess topology.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeTopo

type FakeTopo struct{}

FakeTopo is a topo.Server implementation that always returns errNotImplemented errors.

func (FakeTopo) Close

func (ft FakeTopo) Close()

Close is part of the topo.Server interface.

func (FakeTopo) Create

func (ft FakeTopo) Create(ctx context.Context, cell, filePath string, contents []byte) (topo.Version, error)

Create is part of the topo.Backend interface.

func (FakeTopo) CreateKeyspace

func (ft FakeTopo) CreateKeyspace(ctx context.Context, keyspace string, value *topodatapb.Keyspace) error

CreateKeyspace is part of the topo.Server interface.

func (FakeTopo) CreateShard

func (ft FakeTopo) CreateShard(ctx context.Context, keyspace, shard string, value *topodatapb.Shard) error

CreateShard is part of the topo.Server interface.

func (FakeTopo) CreateTablet

func (ft FakeTopo) CreateTablet(ctx context.Context, tablet *topodatapb.Tablet) error

CreateTablet is part of the topo.Server interface.

func (FakeTopo) Delete

func (ft FakeTopo) Delete(ctx context.Context, cell, filePath string, version topo.Version) error

Delete is part of the topo.Backend interface.

func (FakeTopo) DeleteKeyspace

func (ft FakeTopo) DeleteKeyspace(ctx context.Context, keyspace string) error

DeleteKeyspace is part of the topo.Server interface.

func (FakeTopo) DeleteKeyspaceReplication

func (ft FakeTopo) DeleteKeyspaceReplication(ctx context.Context, cell, keyspace string) error

DeleteKeyspaceReplication is part of the topo.Server interface.

func (FakeTopo) DeleteShard

func (ft FakeTopo) DeleteShard(ctx context.Context, keyspace, shard string) error

DeleteShard is part of the topo.Server interface.

func (FakeTopo) DeleteShardReplication

func (ft FakeTopo) DeleteShardReplication(ctx context.Context, cell, keyspace, shard string) error

DeleteShardReplication is part of the topo.Server interface.

func (FakeTopo) DeleteSrvKeyspace

func (ft FakeTopo) DeleteSrvKeyspace(ctx context.Context, cell, keyspace string) error

DeleteSrvKeyspace is part of the topo.Server interface.

func (FakeTopo) DeleteTablet

func (ft FakeTopo) DeleteTablet(ctx context.Context, alias *topodatapb.TabletAlias) error

DeleteTablet is part of the topo.Server interface.

func (FakeTopo) Get

func (ft FakeTopo) Get(ctx context.Context, cell, filePath string) ([]byte, topo.Version, error)

Get is part of the topo.Backend interface.

func (FakeTopo) GetKeyspace

func (ft FakeTopo) GetKeyspace(ctx context.Context, keyspace string) (*topodatapb.Keyspace, int64, error)

GetKeyspace is part of the topo.Server interface.

func (FakeTopo) GetKeyspaces

func (ft FakeTopo) GetKeyspaces(ctx context.Context) ([]string, error)

GetKeyspaces is part of the topo.Server interface.

func (FakeTopo) GetKnownCells

func (ft FakeTopo) GetKnownCells(ctx context.Context) ([]string, error)

GetKnownCells is part of the topo.Server interface.

func (FakeTopo) GetShard

func (ft FakeTopo) GetShard(ctx context.Context, keyspace, shard string) (*topodatapb.Shard, int64, error)

GetShard is part of the topo.Server interface.

func (FakeTopo) GetShardNames

func (ft FakeTopo) GetShardNames(ctx context.Context, keyspace string) ([]string, error)

GetShardNames is part of the topo.Server interface.

func (FakeTopo) GetShardReplication

func (ft FakeTopo) GetShardReplication(ctx context.Context, cell, keyspace, shard string) (*topo.ShardReplicationInfo, error)

GetShardReplication is part of the topo.Server interface.

func (FakeTopo) GetSrvKeyspace

func (ft FakeTopo) GetSrvKeyspace(ctx context.Context, cell, keyspace string) (*topodatapb.SrvKeyspace, error)

GetSrvKeyspace is part of the topo.Server interface.

func (FakeTopo) GetSrvKeyspaceNames

func (ft FakeTopo) GetSrvKeyspaceNames(ctx context.Context, cell string) ([]string, error)

GetSrvKeyspaceNames is part of the topo.Server interface.

func (FakeTopo) GetSrvVSchema

func (ft FakeTopo) GetSrvVSchema(ctx context.Context, cell string) (*vschemapb.SrvVSchema, error)

GetSrvVSchema is part of the topo.Server interface.

func (FakeTopo) GetTablet

func (ft FakeTopo) GetTablet(ctx context.Context, alias *topodatapb.TabletAlias) (*topodatapb.Tablet, int64, error)

GetTablet is part of the topo.Server interface.

func (FakeTopo) GetTabletsByCell

func (ft FakeTopo) GetTabletsByCell(ctx context.Context, cell string) ([]*topodatapb.TabletAlias, error)

GetTabletsByCell is part of the topo.Server interface.

func (FakeTopo) GetVSchema

func (ft FakeTopo) GetVSchema(ctx context.Context, keyspace string) (*vschemapb.Keyspace, error)

GetVSchema is part of the topo.Server interface.

func (FakeTopo) ListDir

func (ft FakeTopo) ListDir(ctx context.Context, cell, dirPath string) ([]string, error)

ListDir is part of the topo.Backend interface.

func (FakeTopo) LockKeyspaceForAction

func (ft FakeTopo) LockKeyspaceForAction(ctx context.Context, keyspace, contents string) (string, error)

LockKeyspaceForAction is part of the topo.Server interface.

func (FakeTopo) LockShardForAction

func (ft FakeTopo) LockShardForAction(ctx context.Context, keyspace, shard, contents string) (string, error)

LockShardForAction is part of the topo.Server interface.

func (FakeTopo) NewMasterParticipation

func (ft FakeTopo) NewMasterParticipation(name, id string) (topo.MasterParticipation, error)

NewMasterParticipation is part of the topo.Server interface.

func (FakeTopo) SaveVSchema

func (ft FakeTopo) SaveVSchema(context.Context, string, *vschemapb.Keyspace) error

SaveVSchema is part of the topo.Server interface.

func (FakeTopo) UnlockKeyspaceForAction

func (ft FakeTopo) UnlockKeyspaceForAction(ctx context.Context, keyspace, lockPath, results string) error

UnlockKeyspaceForAction is part of the topo.Server interface.

func (FakeTopo) UnlockShardForAction

func (ft FakeTopo) UnlockShardForAction(ctx context.Context, keyspace, shard, lockPath, results string) error

UnlockShardForAction is part of the topo.Server interface.

func (FakeTopo) Update

func (ft FakeTopo) Update(ctx context.Context, cell, filePath string, contents []byte, version topo.Version) (topo.Version, error)

Update is part of the topo.Backend interface.

func (FakeTopo) UpdateKeyspace

func (ft FakeTopo) UpdateKeyspace(ctx context.Context, keyspace string, value *topodatapb.Keyspace, existingVersion int64) (int64, error)

UpdateKeyspace is part of the topo.Server interface.

func (FakeTopo) UpdateShard

func (ft FakeTopo) UpdateShard(ctx context.Context, keyspace, shard string, value *topodatapb.Shard, existingVersion int64) (int64, error)

UpdateShard is part of the topo.Server interface.

func (FakeTopo) UpdateShardReplicationFields

func (ft FakeTopo) UpdateShardReplicationFields(ctx context.Context, cell, keyspace, shard string, update func(*topodatapb.ShardReplication) error) error

UpdateShardReplicationFields is part of the topo.Server interface.

func (FakeTopo) UpdateSrvKeyspace

func (ft FakeTopo) UpdateSrvKeyspace(ctx context.Context, cell, keyspace string, srvKeyspace *topodatapb.SrvKeyspace) error

UpdateSrvKeyspace is part of the topo.Server interface.

func (FakeTopo) UpdateSrvVSchema

func (ft FakeTopo) UpdateSrvVSchema(ctx context.Context, cell string, srvVSchema *vschemapb.SrvVSchema) error

UpdateSrvVSchema is part of the topo.Server interface.

func (FakeTopo) UpdateTablet

func (ft FakeTopo) UpdateTablet(ctx context.Context, tablet *topodatapb.Tablet, existingVersion int64) (newVersion int64, err error)

UpdateTablet is part of the topo.Server interface.

func (FakeTopo) Watch

func (ft FakeTopo) Watch(ctx context.Context, cell string, path string) (*topo.WatchData, <-chan *topo.WatchData, topo.CancelFunc)

Watch is part of the topo.Backend interface.

Jump to

Keyboard shortcuts

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