-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconst.go
75 lines (61 loc) · 1.51 KB
/
const.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Tideland Go Cells - Constants
//
// Copyright (C) 2010-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.
package cells
//--------------------
// IMPORTS
//--------------------
import (
"time"
)
//--------------------
// CONSTANTS
//--------------------
// CriterionMatch signals, how a criterion matches.
type CriterionMatch int
// List of criterion match signals.
const (
CriterionDone CriterionMatch = iota + 1
CriterionKeep
CriterionDropFirst
CriterionDropLast
CriterionClear
)
// Standard topics.
const (
TopicCollected = "collected"
TopicCounted = "counted"
TopicProcess = "process"
TopicProcessed = "processed"
TopicReset = "reset"
TopicStatus = "status"
TopicTick = "tick"
)
// Standard constant payloads.
const (
PayloadClear = true
)
// Default timeout for requests to cells.
const (
DefaultTimeout = 5 * time.Second
)
const (
// minEventBufferSize is the minimum size of the
// event buffer per cell.
minEventBufferSize = 16
// minRecoveringNumber and minRecoveringDuration
// control the default recovering frequency.
minRecoveringNumber = 10
minRecoveringDuration = time.Second
// minEmitTimeout is the minimum allowed timeout
// for event emitting (see below).
minEmitTimeout = 5 * time.Second
// maxEmitTimeout is the maximum time to emit an
// event into a cells event buffer before a timeout
// error is returned to the emitter.
maxEmitTimeout = 30 * time.Second
)
// EOF