Documentation ¶
Overview ¶
Package faketopo contains utitlities for tests that have to interact with a Vitess topology.
Index ¶
- type FakeTopo
- func (ft FakeTopo) Close()
- func (ft FakeTopo) CreateEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, ...) error
- func (ft FakeTopo) CreateKeyspace(ctx context.Context, keyspace string, value *pb.Keyspace) error
- func (ft FakeTopo) CreateShard(ctx context.Context, keyspace, shard string, value *pb.Shard) error
- func (ft FakeTopo) CreateTablet(ctx context.Context, tablet *pb.Tablet) error
- func (ft FakeTopo) DeleteEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, ...) error
- func (ft FakeTopo) DeleteKeyspace(ctx context.Context, keyspace string) error
- func (ft FakeTopo) DeleteKeyspaceReplication(ctx context.Context, cell, keyspace string) error
- func (ft FakeTopo) DeleteKeyspaceShards(ctx context.Context, keyspace string) error
- func (ft FakeTopo) DeleteShard(ctx context.Context, keyspace, shard string) error
- func (ft FakeTopo) DeleteShardReplication(ctx context.Context, cell, keyspace, shard string) error
- func (ft FakeTopo) DeleteSrvKeyspace(ctx context.Context, cell, keyspace string) error
- func (ft FakeTopo) DeleteSrvShard(ctx context.Context, cell, keyspace, shard string) error
- func (ft FakeTopo) DeleteTablet(ctx context.Context, alias *pb.TabletAlias) error
- func (ft FakeTopo) GetEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType) (*pb.EndPoints, int64, error)
- func (ft FakeTopo) GetKeyspace(ctx context.Context, keyspace string) (*pb.Keyspace, int64, error)
- func (ft FakeTopo) GetKeyspaces(ctx context.Context) ([]string, error)
- func (ft FakeTopo) GetKnownCells(ctx context.Context) ([]string, error)
- func (ft FakeTopo) GetShard(ctx context.Context, keyspace, shard string) (*pb.Shard, int64, error)
- func (ft FakeTopo) GetShardNames(ctx context.Context, keyspace string) ([]string, error)
- func (ft FakeTopo) GetShardReplication(ctx context.Context, cell, keyspace, shard string) (*topo.ShardReplicationInfo, error)
- func (ft FakeTopo) GetSrvKeyspace(ctx context.Context, cell, keyspace string) (*topo.SrvKeyspace, error)
- func (ft FakeTopo) GetSrvKeyspaceNames(ctx context.Context, cell string) ([]string, error)
- func (ft FakeTopo) GetSrvShard(ctx context.Context, cell, keyspace, shard string) (*pb.SrvShard, error)
- func (ft FakeTopo) GetSrvTabletTypesPerShard(ctx context.Context, cell, keyspace, shard string) ([]pb.TabletType, error)
- func (ft FakeTopo) GetTablet(ctx context.Context, alias *pb.TabletAlias) (*pb.Tablet, int64, error)
- func (ft FakeTopo) GetTabletsByCell(ctx context.Context, cell string) ([]*pb.TabletAlias, error)
- func (ft FakeTopo) GetVSchema(ctx context.Context) (string, error)
- func (ft FakeTopo) LockKeyspaceForAction(ctx context.Context, keyspace, contents string) (string, error)
- func (ft FakeTopo) LockShardForAction(ctx context.Context, keyspace, shard, contents string) (string, error)
- func (ft FakeTopo) LockSrvShardForAction(ctx context.Context, cell, keyspace, shard, contents string) (string, error)
- func (ft FakeTopo) SaveVSchema(context.Context, string) error
- func (ft FakeTopo) UnlockKeyspaceForAction(ctx context.Context, keyspace, lockPath, results string) error
- func (ft FakeTopo) UnlockShardForAction(ctx context.Context, keyspace, shard, lockPath, results string) error
- func (ft FakeTopo) UnlockSrvShardForAction(ctx context.Context, cell, keyspace, shard, lockPath, results string) error
- func (ft FakeTopo) UpdateEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, ...) error
- func (ft FakeTopo) UpdateKeyspace(ctx context.Context, keyspace string, value *pb.Keyspace, ...) (int64, error)
- func (ft FakeTopo) UpdateShard(ctx context.Context, keyspace, shard string, value *pb.Shard, ...) (int64, error)
- func (ft FakeTopo) UpdateShardReplicationFields(ctx context.Context, cell, keyspace, shard string, ...) error
- func (ft FakeTopo) UpdateSrvKeyspace(ctx context.Context, cell, keyspace string, srvKeyspace *topo.SrvKeyspace) error
- func (ft FakeTopo) UpdateSrvShard(ctx context.Context, cell, keyspace, shard string, srvShard *pb.SrvShard) error
- func (ft FakeTopo) UpdateTablet(ctx context.Context, tablet *pb.Tablet, existingVersion int64) (newVersion int64, err error)
- func (ft FakeTopo) UpdateTabletFields(ctx context.Context, tabletAlias *pb.TabletAlias, ...) (*pb.Tablet, error)
- func (ft FakeTopo) ValidateShard(ctx context.Context, keyspace, shard string) error
- func (ft FakeTopo) WatchSrvKeyspace(ctx context.Context, cell, keyspace string) (<-chan *topo.SrvKeyspace, chan<- struct{}, error)
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) CreateEndPoints ¶
func (ft FakeTopo) CreateEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, addrs *pb.EndPoints) error
CreateEndPoints implements topo.Server.
func (FakeTopo) CreateKeyspace ¶
CreateKeyspace implements topo.Server.
func (FakeTopo) CreateShard ¶
CreateShard implements topo.Server.
func (FakeTopo) CreateTablet ¶
CreateTablet implements topo.Server.
func (FakeTopo) DeleteEndPoints ¶
func (ft FakeTopo) DeleteEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, existingVersion int64) error
DeleteEndPoints implements topo.Server.
func (FakeTopo) DeleteKeyspace ¶
DeleteKeyspace implements topo.Server.
func (FakeTopo) DeleteKeyspaceReplication ¶
DeleteKeyspaceReplication implements topo.Server.
func (FakeTopo) DeleteKeyspaceShards ¶
DeleteKeyspaceShards implements topo.Server.
func (FakeTopo) DeleteShard ¶
DeleteShard implements topo.Server.
func (FakeTopo) DeleteShardReplication ¶
DeleteShardReplication implements topo.Server.
func (FakeTopo) DeleteSrvKeyspace ¶
DeleteSrvKeyspace implements topo.Server.
func (FakeTopo) DeleteSrvShard ¶
DeleteSrvShard implements topo.Server.
func (FakeTopo) DeleteTablet ¶
DeleteTablet implements topo.Server.
func (FakeTopo) GetEndPoints ¶
func (ft FakeTopo) GetEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType) (*pb.EndPoints, int64, error)
GetEndPoints implements topo.Server.
func (FakeTopo) GetKeyspace ¶
GetKeyspace implements topo.Server.
func (FakeTopo) GetKeyspaces ¶
GetKeyspaces implements topo.Server.
func (FakeTopo) GetKnownCells ¶
GetKnownCells implements topo.Server.
func (FakeTopo) GetShardNames ¶
GetShardNames implements topo.Server.
func (FakeTopo) GetShardReplication ¶
func (ft FakeTopo) GetShardReplication(ctx context.Context, cell, keyspace, shard string) (*topo.ShardReplicationInfo, error)
GetShardReplication implements topo.Server.
func (FakeTopo) GetSrvKeyspace ¶
func (ft FakeTopo) GetSrvKeyspace(ctx context.Context, cell, keyspace string) (*topo.SrvKeyspace, error)
GetSrvKeyspace implements topo.Server.
func (FakeTopo) GetSrvKeyspaceNames ¶
GetSrvKeyspaceNames implements topo.Server.
func (FakeTopo) GetSrvShard ¶
func (ft FakeTopo) GetSrvShard(ctx context.Context, cell, keyspace, shard string) (*pb.SrvShard, error)
GetSrvShard implements topo.Server.
func (FakeTopo) GetSrvTabletTypesPerShard ¶
func (ft FakeTopo) GetSrvTabletTypesPerShard(ctx context.Context, cell, keyspace, shard string) ([]pb.TabletType, error)
GetSrvTabletTypesPerShard implements topo.Server.
func (FakeTopo) GetTabletsByCell ¶
GetTabletsByCell implements topo.Server.
func (FakeTopo) GetVSchema ¶
GetVSchema implements topo.Server.
func (FakeTopo) LockKeyspaceForAction ¶
func (ft FakeTopo) LockKeyspaceForAction(ctx context.Context, keyspace, contents string) (string, error)
LockKeyspaceForAction implements topo.Server.
func (FakeTopo) LockShardForAction ¶
func (ft FakeTopo) LockShardForAction(ctx context.Context, keyspace, shard, contents string) (string, error)
LockShardForAction implements topo.Server.
func (FakeTopo) LockSrvShardForAction ¶
func (ft FakeTopo) LockSrvShardForAction(ctx context.Context, cell, keyspace, shard, contents string) (string, error)
LockSrvShardForAction implements topo.Server.
func (FakeTopo) SaveVSchema ¶
SaveVSchema implements topo.Server.
func (FakeTopo) UnlockKeyspaceForAction ¶
func (ft FakeTopo) UnlockKeyspaceForAction(ctx context.Context, keyspace, lockPath, results string) error
UnlockKeyspaceForAction implements topo.Server.
func (FakeTopo) UnlockShardForAction ¶
func (ft FakeTopo) UnlockShardForAction(ctx context.Context, keyspace, shard, lockPath, results string) error
UnlockShardForAction implements topo.Server.
func (FakeTopo) UnlockSrvShardForAction ¶
func (ft FakeTopo) UnlockSrvShardForAction(ctx context.Context, cell, keyspace, shard, lockPath, results string) error
UnlockSrvShardForAction implements topo.Server.
func (FakeTopo) UpdateEndPoints ¶
func (ft FakeTopo) UpdateEndPoints(ctx context.Context, cell, keyspace, shard string, tabletType pb.TabletType, addrs *pb.EndPoints, existingVersion int64) error
UpdateEndPoints implements topo.Server.
func (FakeTopo) UpdateKeyspace ¶
func (ft FakeTopo) UpdateKeyspace(ctx context.Context, keyspace string, value *pb.Keyspace, existingVersion int64) (int64, error)
UpdateKeyspace implements topo.Server.
func (FakeTopo) UpdateShard ¶
func (ft FakeTopo) UpdateShard(ctx context.Context, keyspace, shard string, value *pb.Shard, existingVersion int64) (int64, error)
UpdateShard implements topo.Server.
func (FakeTopo) UpdateShardReplicationFields ¶
func (ft FakeTopo) UpdateShardReplicationFields(ctx context.Context, cell, keyspace, shard string, update func(*pb.ShardReplication) error) error
UpdateShardReplicationFields implements topo.Server.
func (FakeTopo) UpdateSrvKeyspace ¶
func (ft FakeTopo) UpdateSrvKeyspace(ctx context.Context, cell, keyspace string, srvKeyspace *topo.SrvKeyspace) error
UpdateSrvKeyspace implements topo.Server.
func (FakeTopo) UpdateSrvShard ¶
func (ft FakeTopo) UpdateSrvShard(ctx context.Context, cell, keyspace, shard string, srvShard *pb.SrvShard) error
UpdateSrvShard implements topo.Server.
func (FakeTopo) UpdateTablet ¶
func (ft FakeTopo) UpdateTablet(ctx context.Context, tablet *pb.Tablet, existingVersion int64) (newVersion int64, err error)
UpdateTablet implements topo.Server.
func (FakeTopo) UpdateTabletFields ¶
func (ft FakeTopo) UpdateTabletFields(ctx context.Context, tabletAlias *pb.TabletAlias, update func(*pb.Tablet) error) (*pb.Tablet, error)
UpdateTabletFields implements topo.Server.
func (FakeTopo) ValidateShard ¶
ValidateShard implements topo.Server.
func (FakeTopo) WatchSrvKeyspace ¶
func (ft FakeTopo) WatchSrvKeyspace(ctx context.Context, cell, keyspace string) (<-chan *topo.SrvKeyspace, chan<- struct{}, error)
WatchSrvKeyspace implements topo.Server.WatchSrvKeyspace