forked from keybase/kbfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.go
33 lines (24 loc) · 1.28 KB
/
constants.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
// Copyright 2017 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import "time"
// RPCReconnectInterval specifies the time between reconnect attempts for RPC Connections.
const RPCReconnectInterval = 2 * time.Second
// rekeyRecheckInterval is the time duration to wait for before rechecking for
// rekey for the same TLF. See fbo.Rekey for more details.
const rekeyRecheckInterval = 30 * time.Second
// rekeyInitialTTL is the maximum number rechecks each rekey request can trigger.
const rekeyInitialTTL = 4
// mdserverReconnectBackoffWindow is a backoff window within which we try to
// wait randomly for before reconnecting to MD server.
const mdserverReconnectBackoffWindow = time.Hour
// bserverReconnectBackoffWindow is a backoff window within which we try to
// wait randomly for before reconnecting to bserver.
const bserverReconnectBackoffWindow = time.Hour
// registerForUpdatesFireNowThreshold is the maximum length of time that
// KBFS can be idle for, in order to trigger FireNow from RegisterForUpdate.
const registerForUpdatesFireNowThreshold = 10 * time.Minute
// dialerTimeout is the TCP dial timeout used by mdserver and bserver RPC
// connections.
const dialerTimeout = 16 * time.Second