本文整理匯總了Golang中github.com/henryanand/vitess/go/vt/tabletmanager/tmclient.TabletManagerClient類的典型用法代碼示例。如果您正苦於以下問題:Golang TabletManagerClient類的具體用法?Golang TabletManagerClient怎麽用?Golang TabletManagerClient使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TabletManagerClient類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: agentRpcTestReloadSchema
func agentRpcTestReloadSchema(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.ReloadSchema(ctx, ti)
if err != nil {
t.Errorf("ReloadSchema failed: %v", err)
}
if !testReloadSchemaCalled {
t.Errorf("ReloadSchema didn't call the server side")
}
}
示例2: agentRpcTestRestore
func agentRpcTestRestore(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
logChannel, errFunc, err := client.Restore(ctx, ti, testRestoreArgs, time.Minute)
if err != nil {
t.Fatalf("Restore failed: %v", err)
}
compareLoggedStuff(t, "Restore", logChannel, 10)
err = errFunc()
compareError(t, "Restore", err, true, testRestoreCalled)
}
示例3: agentRpcTestSnapshot
func agentRpcTestSnapshot(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
logChannel, errFunc, err := client.Snapshot(ctx, ti, testSnapshotArgs, time.Minute)
if err != nil {
t.Fatalf("Snapshot failed: %v", err)
}
compareLoggedStuff(t, "Snapshot", logChannel, 0)
sr, err := errFunc()
compareError(t, "Snapshot", err, sr, testSnapshotReply)
}
示例4: agentRpcTestSetReadOnly
func agentRpcTestSetReadOnly(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
testSetReadOnlyExpectedValue = true
err := client.SetReadOnly(ctx, ti)
if err != nil {
t.Errorf("SetReadOnly failed: %v", err)
}
testSetReadOnlyExpectedValue = false
err = client.SetReadWrite(ctx, ti)
if err != nil {
t.Errorf("SetReadWrite failed: %v", err)
}
}
示例5: agentRpcTestRunBlpUntil
func agentRpcTestRunBlpUntil(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
rp, err := client.RunBlpUntil(ctx, ti, testBlpPositionList, testRunBlpUntilWaitTime)
compareError(t, "RunBlpUntil", err, rp, testReplicationPosition)
}
示例6: agentRpcTestStopBlp
func agentRpcTestStopBlp(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
bpl, err := client.StopBlp(ctx, ti)
compareError(t, "StopBlp", err, bpl, testBlpPositionList)
}
示例7: agentRpcTestStartBlp
func agentRpcTestStartBlp(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.StartBlp(ctx, ti)
compareError(t, "StartBlp", err, true, testStartBlpCalled)
}
示例8: agentRpcTestRunHealthCheck
func agentRpcTestRunHealthCheck(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.RunHealthCheck(ctx, ti, testRunHealthCheckValue)
if err != nil {
t.Errorf("RunHealthCheck failed: %v", err)
}
}
示例9: agentRpcTestWaitBlpPosition
func agentRpcTestWaitBlpPosition(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.WaitBlpPosition(ctx, ti, *testBlpPosition, testWaitBlpPositionWaitTime)
compareError(t, "WaitBlpPosition", err, true, testWaitBlpPositionCalled)
}
示例10: agentRpcTestSlaveWasPromoted
func agentRpcTestSlaveWasPromoted(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.SlaveWasPromoted(ctx, ti)
compareError(t, "SlaveWasPromoted", err, true, testSlaveWasPromotedCalled)
}
示例11: agentRpcTestBreakSlaves
func agentRpcTestBreakSlaves(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.BreakSlaves(ctx, ti)
compareError(t, "BreakSlaves", err, true, testBreakSlavesCalled)
}
示例12: agentRpcTestMasterPosition
func agentRpcTestMasterPosition(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
rs, err := client.MasterPosition(ctx, ti)
compareError(t, "MasterPosition", err, rs, testReplicationPosition)
}
示例13: agentRpcTestReparentPosition
func agentRpcTestReparentPosition(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
rsd, err := client.ReparentPosition(ctx, ti, &testReplicationPosition)
compareError(t, "ReparentPosition", err, rsd, testRestartSlaveData)
}
示例14: agentRpcTestSlaveStatus
func agentRpcTestSlaveStatus(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
rs, err := client.SlaveStatus(ctx, ti)
compareError(t, "SlaveStatus", err, rs, testReplicationStatus)
}
示例15: agentRpcTestWaitSlavePosition
func agentRpcTestWaitSlavePosition(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
rs, err := client.WaitSlavePosition(ctx, ti, testReplicationPosition, testWaitSlavePositionWaitTimeout)
compareError(t, "WaitSlavePosition", err, rs, testReplicationStatus)
}