當前位置: 首頁>>代碼示例>>Golang>>正文


Golang IndexManager.HandleDeleteIndexDDL方法代碼示例

本文整理匯總了Golang中github.com/couchbase/indexing/secondary/manager.IndexManager.HandleDeleteIndexDDL方法的典型用法代碼示例。如果您正苦於以下問題:Golang IndexManager.HandleDeleteIndexDDL方法的具體用法?Golang IndexManager.HandleDeleteIndexDDL怎麽用?Golang IndexManager.HandleDeleteIndexDDL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/couchbase/indexing/secondary/manager.IndexManager的用法示例。


在下文中一共展示了IndexManager.HandleDeleteIndexDDL方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: cleanup

// clean up
func cleanup(mgr *manager.IndexManager, t *testing.T) {

	err := mgr.HandleDeleteIndexDDL(common.IndexDefnId(200))
	if err != nil {
		logging.Infof("Error deleting index %s:%s, err=%s", "Default", "coordinator_test", err)
	}
	time.Sleep(time.Duration(1000) * time.Millisecond)
}
開發者ID:jchris,項目名稱:indexing,代碼行數:9,代碼來源:coordinator_test.go

示例2: deleteIndexForDeleteTest

func deleteIndexForDeleteTest(mgr *manager.IndexManager) {

	//
	// Delete a new index definition : 401 (Default)
	//
	logging.Infof("Run Delete Test : Delete Index Defn 401")
	if err := mgr.HandleDeleteIndexDDL(common.IndexDefnId(401)); err != nil {
		util.TT.Fatal(err)
	}
}
開發者ID:jchris,項目名稱:indexing,代碼行數:10,代碼來源:stream_delete_test.go

示例3: cleanSingleIndex_managerTest

func cleanSingleIndex_managerTest(mgr *manager.IndexManager, t *testing.T, id common.IndexDefnId) {

	_, err := mgr.GetIndexDefnById(id)
	if err != nil {
		logging.Infof("cleanupTest() :  cannot find index defn %d.  No cleanup ...", id)
	} else {
		logging.Infof("cleanupTest.cleanupTest() :  found index defn %d.  Cleaning up ...", id)

		mgr.HandleDeleteIndexDDL(id)

		_, err := mgr.GetIndexDefnById(id)
		if err == nil {
			logging.Infof("cleanupTest() :  cannot cleanup index defn %d.  ...", id)
		}
	}
}
開發者ID:jchris,項目名稱:indexing,代碼行數:16,代碼來源:manager_test.go

示例4: cleanupRequestHandlerTest

// clean up
func cleanupRequestHandlerTest(mgr *manager.IndexManager, t *testing.T) {

	_, err := mgr.GetIndexDefnById(common.IndexDefnId(500))
	if err != nil {
		logging.Infof("RequestHandlerTest.cleanupRequestHandlerTest() :  cannot find index defn request_handler_test.  No cleanup ...")
	} else {
		logging.Infof("RequestHandlerTest.cleanupRequestHandlerTest() :  found index defn request_handler_test.  Cleaning up ...")

		err = mgr.HandleDeleteIndexDDL(common.IndexDefnId(500))
		if err != nil {
			t.Fatal(err)
		}
		time.Sleep(time.Duration(1000) * time.Millisecond)

		// double check if we have really cleaned up
		_, err := mgr.GetIndexDefnById(common.IndexDefnId(500))
		if err == nil {
			t.Fatal("RequestHandlerTest.cleanupRequestHandlerTest(): Cannot clean up index defn request_handler_test")
		}
	}
}
開發者ID:jchris,項目名稱:indexing,代碼行數:22,代碼來源:request_handler_test.go

示例5: cleanupStreamMgrTimerTest

// clean up
func cleanupStreamMgrTimerTest(mgr *manager.IndexManager) {

	_, err := mgr.GetIndexDefnById(common.IndexDefnId(406))
	if err != nil {
		logging.Infof("StreamMgrTest.cleanupStreamMgrTimerTest() :  cannot find index defn stream_mgr_timer_test.  No cleanup ...")
	} else {
		logging.Infof("StreamMgrTest.cleanupStreamMgrTimerTest() :  found index defn stream_mgr_timer_test.  Cleaning up ...")

		err = mgr.HandleDeleteIndexDDL(common.IndexDefnId(406))
		if err != nil {
			util.TT.Fatal(err)
		}
		time.Sleep(time.Duration(1000) * time.Millisecond)

		// double check if we have really cleaned up
		_, err := mgr.GetIndexDefnById(common.IndexDefnId(406))
		if err == nil {
			util.TT.Fatal("StreamMgrTest.cleanupStreamMgrTimerTest(): Cannot clean up index defn stream_mgr_timer_test")
		}
	}

	time.Sleep(time.Duration(1000) * time.Millisecond)
}
開發者ID:jchris,項目名稱:indexing,代碼行數:24,代碼來源:stream_timer_test.go


注:本文中的github.com/couchbase/indexing/secondary/manager.IndexManager.HandleDeleteIndexDDL方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。