mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-21 20:13:24 +02:00
* Fix bug on migration 111 * Upgrade bleve to 1.0.10 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
65 lines
2.3 KiB
Go
Vendored
65 lines
2.3 KiB
Go
Vendored
// Copyright (c) 2018 Couchbase, Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package scorch
|
|
|
|
import "time"
|
|
|
|
// RegistryAsyncErrorCallbacks should be treated as read-only after
|
|
// process init()'ialization.
|
|
var RegistryAsyncErrorCallbacks = map[string]func(error){}
|
|
|
|
// RegistryEventCallbacks should be treated as read-only after
|
|
// process init()'ialization.
|
|
var RegistryEventCallbacks = map[string]func(Event){}
|
|
|
|
// Event represents the information provided in an OnEvent() callback.
|
|
type Event struct {
|
|
Kind EventKind
|
|
Scorch *Scorch
|
|
Duration time.Duration
|
|
}
|
|
|
|
// EventKind represents an event code for OnEvent() callbacks.
|
|
type EventKind int
|
|
|
|
// EventKindCloseStart is fired when a Scorch.Close() has begun.
|
|
var EventKindCloseStart = EventKind(1)
|
|
|
|
// EventKindClose is fired when a scorch index has been fully closed.
|
|
var EventKindClose = EventKind(2)
|
|
|
|
// EventKindMergerProgress is fired when the merger has completed a
|
|
// round of merge processing.
|
|
var EventKindMergerProgress = EventKind(3)
|
|
|
|
// EventKindPersisterProgress is fired when the persister has completed
|
|
// a round of persistence processing.
|
|
var EventKindPersisterProgress = EventKind(4)
|
|
|
|
// EventKindBatchIntroductionStart is fired when Batch() is invoked which
|
|
// introduces a new segment.
|
|
var EventKindBatchIntroductionStart = EventKind(5)
|
|
|
|
// EventKindBatchIntroduction is fired when Batch() completes.
|
|
var EventKindBatchIntroduction = EventKind(6)
|
|
|
|
// EventKindMergeTaskIntroductionStart is fired when the merger is about to
|
|
// start the introduction of merged segment from a single merge task.
|
|
var EventKindMergeTaskIntroductionStart = EventKind(7)
|
|
|
|
// EventKindMergeTaskIntroduction is fired when the merger has completed
|
|
// the introduction of merged segment from a single merge task.
|
|
var EventKindMergeTaskIntroduction = EventKind(8)
|