-
Notifications
You must be signed in to change notification settings - Fork 28
/
query_event.go
35 lines (26 loc) · 1.15 KB
/
query_event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2018-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be governed by the Apache License, Version 2.0, included in
// the file licenses/APL2.txt.
package cbft
import "time"
// RegistryQueryEventCallbacks should be treated as read-only after
// process init()'ialization.
var RegistryQueryEventCallback func(int, QueryEvent, uint64) error
type QueryEvent struct {
Kind QueryEventKind
Duration time.Duration
}
// QueryEventKind represents an event code for OnEvent() callbacks.
type QueryEventKind int
// EventQueryStart is fired before a query begins the search.
var EventQueryStart = QueryEventKind(1)
// EventQueryEnd is fired upon the completion of a query.
var EventQueryEnd = QueryEventKind(2)
// EventKNNQueryStart is fired before a knn query begins the search.
var EventKNNQueryStart = QueryEventKind(3)
// EventKNNQueryEnd is fired upon the completion of a knn query.
var EventKNNQueryEnd = QueryEventKind(4)