本文整理汇总了Golang中github.com/henryanand/vitess/go/vt/tabletmanager/tmclient.TabletManagerClient类的典型用法代码示例。如果您正苦于以下问题:Golang TabletManagerClient类的具体用法?Golang TabletManagerClient怎么用?Golang TabletManagerClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TabletManagerClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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")
}
}
开发者ID:henryanand,项目名称:vitess,代码行数:9,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:9,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:9,代码来源:test_agent_rpc.go
示例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)
}
}
开发者ID:henryanand,项目名称:vitess,代码行数:12,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
}
开发者ID:henryanand,项目名称:vitess,代码行数:6,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例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)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例16: agentRpcTestExecuteFetch
func agentRpcTestExecuteFetch(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
qr, err := client.ExecuteFetch(ctx, ti, testExecuteFetchQuery, testExecuteFetchMaxRows, true, true)
compareError(t, "ExecuteFetch", err, qr, testExecuteFetchResult)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例17: agentRpcTestApplySchema
func agentRpcTestApplySchema(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
scr, err := client.ApplySchema(ctx, ti, testSchemaChange)
compareError(t, "ApplySchema", err, scr, testSchemaChangeResult)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例18: agentRpcTestSleep
func agentRpcTestSleep(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.Sleep(ctx, ti, testSleepDuration)
if err != nil {
t.Errorf("Sleep failed: %v", err)
}
}
开发者ID:henryanand,项目名称:vitess,代码行数:6,代码来源:test_agent_rpc.go
示例19: agentRpcTestDemoteMaster
func agentRpcTestDemoteMaster(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.DemoteMaster(ctx, ti)
compareError(t, "DemoteMaster", err, true, testDemoteMasterCalled)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
示例20: agentRpcTestSnapshotSourceEnd
func agentRpcTestSnapshotSourceEnd(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, ti *topo.TabletInfo) {
err := client.SnapshotSourceEnd(ctx, ti, testSnapshotSourceEndArgs)
compareError(t, "SnapshotSourceEnd", err, true, testSnapshotSourceEndCalled)
}
开发者ID:henryanand,项目名称:vitess,代码行数:4,代码来源:test_agent_rpc.go
注:本文中的github.com/henryanand/vitess/go/vt/tabletmanager/tmclient.TabletManagerClient类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论