本文整理匯總了Golang中github.com/youtube/vitess/go/vt/tabletmanager/tmclient.TabletManagerClient.RestoreFromBackup方法的典型用法代碼示例。如果您正苦於以下問題:Golang TabletManagerClient.RestoreFromBackup方法的具體用法?Golang TabletManagerClient.RestoreFromBackup怎麽用?Golang TabletManagerClient.RestoreFromBackup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/youtube/vitess/go/vt/tabletmanager/tmclient.TabletManagerClient
的用法示例。
在下文中一共展示了TabletManagerClient.RestoreFromBackup方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: agentRPCTestRestoreFromBackup
func agentRPCTestRestoreFromBackup(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
stream, err := client.RestoreFromBackup(ctx, tablet)
if err != nil {
t.Fatalf("RestoreFromBackup failed: %v", err)
}
err = compareLoggedStuff(t, "RestoreFromBackup", stream, 10)
compareError(t, "RestoreFromBackup", err, true, testRestoreFromBackupCalled)
}
示例2: agentRPCTestRestoreFromBackupPanic
func agentRPCTestRestoreFromBackupPanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
stream, err := client.RestoreFromBackup(ctx, tablet)
if err != nil {
t.Fatalf("RestoreFromBackup failed: %v", err)
}
e, err := stream.Recv()
if err == nil {
t.Fatalf("Unexpected RestoreFromBackup logs: %v", e)
}
expectRPCWrapLockActionPanic(t, err)
}