faketmclient

package
v2.0.0-alpha3+incompat... Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2015 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeTabletManagerClient

func NewFakeTabletManagerClient() tmclient.TabletManagerClient

NewFakeTabletManagerClient should be used to create a new FakeTabletManagerClient. There is intentionally no init in this file with a call to RegisterTabletManagerClientFactory. There shouldn't be any legitimate use-case where we would want to start a vitess cluster with a FakeTMC, and we don't want to do it by accident.

Types

type FakeTabletManagerClient

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

FakeTabletManagerClient implements tmclient.TabletManagerClient TODO(aaijazi): this is a pretty complicated and inconsistent implementation. It can't make up its mind on whether it wants to be a fake, a mock, or act like the real thing. We probably want to move it more consistently towards being a mock, once we standardize how we want to do mocks in vitess. We don't currently have a good way to configure specific return values.

func (*FakeTabletManagerClient) ApplySchema

ApplySchema is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) Backup

func (client *FakeTabletManagerClient) Backup(ctx context.Context, tablet *topo.TabletInfo, concurrency int) (<-chan *logutil.LoggerEvent, tmclient.ErrFunc, error)

Backup is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ChangeType

func (client *FakeTabletManagerClient) ChangeType(ctx context.Context, tablet *topo.TabletInfo, dbType pb.TabletType) error

ChangeType is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) DemoteMaster

DemoteMaster is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ExecuteFetchAsApp

func (client *FakeTabletManagerClient) ExecuteFetchAsApp(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, wantFields bool) (*mproto.QueryResult, error)

ExecuteFetchAsApp is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ExecuteFetchAsDba

func (client *FakeTabletManagerClient) ExecuteFetchAsDba(ctx context.Context, tablet *topo.TabletInfo, query string, maxRows int, wantFields, disableBinlogs, reloadSchema bool) (*mproto.QueryResult, error)

ExecuteFetchAsDba is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ExecuteHook

func (client *FakeTabletManagerClient) ExecuteHook(ctx context.Context, tablet *topo.TabletInfo, hk *hook.Hook) (*hook.HookResult, error)

ExecuteHook is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) GetPermissions

func (client *FakeTabletManagerClient) GetPermissions(ctx context.Context, tablet *topo.TabletInfo) (*myproto.Permissions, error)

GetPermissions is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) GetSchema

func (client *FakeTabletManagerClient) GetSchema(ctx context.Context, tablet *topo.TabletInfo, tables, excludeTables []string, includeViews bool) (*myproto.SchemaDefinition, error)

GetSchema is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) GetSlaves

func (client *FakeTabletManagerClient) GetSlaves(ctx context.Context, tablet *topo.TabletInfo) ([]string, error)

GetSlaves is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) InitMaster

InitMaster is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) InitSlave

func (client *FakeTabletManagerClient) InitSlave(ctx context.Context, tablet *topo.TabletInfo, parent *pb.TabletAlias, replicationPosition myproto.ReplicationPosition, timeCreatedNS int64) error

InitSlave is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) IsTimeoutError

func (client *FakeTabletManagerClient) IsTimeoutError(err error) bool

IsTimeoutError is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) MasterPosition

func (client *FakeTabletManagerClient) MasterPosition(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationPosition, error)

MasterPosition is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) Ping

func (client *FakeTabletManagerClient) Ping(ctx context.Context, tablet *topo.TabletInfo) error

Ping is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) PopulateReparentJournal

func (client *FakeTabletManagerClient) PopulateReparentJournal(ctx context.Context, tablet *topo.TabletInfo, timeCreatedNS int64, actionName string, masterAlias *pb.TabletAlias, pos myproto.ReplicationPosition) error

PopulateReparentJournal is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) PreflightSchema

func (client *FakeTabletManagerClient) PreflightSchema(ctx context.Context, tablet *topo.TabletInfo, change string) (*myproto.SchemaChangeResult, error)

PreflightSchema is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) PromoteSlave

PromoteSlave is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) PromoteSlaveWhenCaughtUp

func (client *FakeTabletManagerClient) PromoteSlaveWhenCaughtUp(ctx context.Context, tablet *topo.TabletInfo, pos myproto.ReplicationPosition) (myproto.ReplicationPosition, error)

PromoteSlaveWhenCaughtUp is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) RefreshState

func (client *FakeTabletManagerClient) RefreshState(ctx context.Context, tablet *topo.TabletInfo) error

RefreshState is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ReloadSchema

func (client *FakeTabletManagerClient) ReloadSchema(ctx context.Context, tablet *topo.TabletInfo) error

ReloadSchema is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) ResetReplication

func (client *FakeTabletManagerClient) ResetReplication(ctx context.Context, tablet *topo.TabletInfo) error

ResetReplication is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) RunBlpUntil

func (client *FakeTabletManagerClient) RunBlpUntil(ctx context.Context, tablet *topo.TabletInfo, positions *blproto.BlpPositionList, waitTime time.Duration) (myproto.ReplicationPosition, error)

RunBlpUntil is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) RunHealthCheck

func (client *FakeTabletManagerClient) RunHealthCheck(ctx context.Context, tablet *topo.TabletInfo, targetTabletType pb.TabletType) error

RunHealthCheck is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) Scrap

func (client *FakeTabletManagerClient) Scrap(ctx context.Context, tablet *topo.TabletInfo) error

Scrap is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SetMaster

func (client *FakeTabletManagerClient) SetMaster(ctx context.Context, tablet *topo.TabletInfo, parent *pb.TabletAlias, timeCreatedNS int64, forceStartSlave bool) error

SetMaster is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SetReadOnly

func (client *FakeTabletManagerClient) SetReadOnly(ctx context.Context, tablet *topo.TabletInfo) error

SetReadOnly is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SetReadWrite

func (client *FakeTabletManagerClient) SetReadWrite(ctx context.Context, tablet *topo.TabletInfo) error

SetReadWrite is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SlaveStatus

SlaveStatus is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SlaveWasPromoted

func (client *FakeTabletManagerClient) SlaveWasPromoted(ctx context.Context, tablet *topo.TabletInfo) error

SlaveWasPromoted is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) SlaveWasRestarted

func (client *FakeTabletManagerClient) SlaveWasRestarted(ctx context.Context, tablet *topo.TabletInfo, args *actionnode.SlaveWasRestartedArgs) error

SlaveWasRestarted is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) Sleep

func (client *FakeTabletManagerClient) Sleep(ctx context.Context, tablet *topo.TabletInfo, duration time.Duration) error

Sleep is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StartBlp

func (client *FakeTabletManagerClient) StartBlp(ctx context.Context, tablet *topo.TabletInfo) error

StartBlp is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StartSlave

func (client *FakeTabletManagerClient) StartSlave(ctx context.Context, tablet *topo.TabletInfo) error

StartSlave is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StopBlp

StopBlp is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StopReplicationAndGetStatus

func (client *FakeTabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, tablet *topo.TabletInfo) (myproto.ReplicationStatus, error)

StopReplicationAndGetStatus is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StopSlave

func (client *FakeTabletManagerClient) StopSlave(ctx context.Context, tablet *topo.TabletInfo) error

StopSlave is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) StopSlaveMinimum

func (client *FakeTabletManagerClient) StopSlaveMinimum(ctx context.Context, tablet *topo.TabletInfo, minPos myproto.ReplicationPosition, waitTime time.Duration) (myproto.ReplicationPosition, error)

StopSlaveMinimum is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) TabletExternallyReparented

func (client *FakeTabletManagerClient) TabletExternallyReparented(ctx context.Context, tablet *topo.TabletInfo, externalID string) error

TabletExternallyReparented is part of the tmclient.TabletManagerClient interface

func (*FakeTabletManagerClient) WaitBlpPosition

func (client *FakeTabletManagerClient) WaitBlpPosition(ctx context.Context, tablet *topo.TabletInfo, blpPosition blproto.BlpPosition, waitTime time.Duration) error

WaitBlpPosition is part of the tmclient.TabletManagerClient interface

Jump to

Keyboard shortcuts

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