-
Notifications
You must be signed in to change notification settings - Fork 1
/
opts.go
42 lines (34 loc) · 858 Bytes
/
opts.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
package payproto
/*
* Dual-licensed under Apache-2.0 and MIT.
*
* You can get a copy of the Apache License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* You can also get a copy of the MIT License at
*
* http://opensource.org/licenses/MIT
*
* @wcgcyx - https://github.com/wcgcyx
*/
import "time"
const (
defaultIOTimeout = 1 * time.Minute
defaultOpTimeout = 30 * time.Second
defaultCleanFreq = 30 * time.Minute
defaultCleanTimeout = 10 * time.Second
)
// Opts is the options for paych protocol.
type Opts struct {
// The datastore path.
Path string
// The timeout for every network io operation.
IOTimeout time.Duration
// The timeout for every internal operation.
OpTimeout time.Duration
// The cleaning frequency.
CleanFreq time.Duration
// The cleaning timeout (for locking).
CleanTimeout time.Duration
}