github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/libkbfs/constants.go (about)

     1  // Copyright 2017 Keybase Inc. All rights reserved.
     2  // Use of this source code is governed by a BSD
     3  // license that can be found in the LICENSE file.
     4  
     5  package libkbfs
     6  
     7  import (
     8  	"syscall"
     9  	"time"
    10  )
    11  
    12  // RPCReconnectInterval specifies the time between reconnect attempts for RPC Connections.
    13  const RPCReconnectInterval = 2 * time.Second
    14  
    15  // rekeyRecheckInterval is the time duration to wait for before rechecking for
    16  // rekey for the same TLF. See fbo.Rekey for more details.
    17  const rekeyRecheckInterval = 30 * time.Second
    18  
    19  // rekeyInitialTTL is the maximum number rechecks each rekey request can trigger.
    20  const rekeyInitialTTL = 4
    21  
    22  // mdserverFirstConnectDelay is the duration we wait for before we try to
    23  // connect to mdserver for the first time..
    24  const mdserverFirstConnectDelay = time.Second * 10
    25  
    26  // mdserverReconnectBackoffWindow is a backoff window within which we try to
    27  // wait randomly for before reconnecting to MD server.
    28  const mdserverReconnectBackoffWindow = time.Hour
    29  
    30  // bserverFirstConnectDelay is the duration we wait for before we try to
    31  // connect to mdserver for the first time..
    32  const bserverFirstConnectDelay = time.Second * 10
    33  
    34  // bserverReconnectBackoffWindow is a backoff window within which we try to
    35  // wait randomly for before reconnecting to bserver.
    36  const bserverReconnectBackoffWindow = time.Hour
    37  
    38  // registerForUpdatesFireNowThreshold is the maximum length of time that
    39  // KBFS can be idle for, in order to trigger FireNow from RegisterForUpdate.
    40  const registerForUpdatesFireNowThreshold = 10 * time.Minute
    41  
    42  // dialerTimeout is the TCP dial timeout used by mdserver and bserver RPC
    43  // connections.
    44  const dialerTimeout = 16 * time.Second
    45  
    46  // NonexistentSignal is a signal that will never be used by the OS.
    47  const NonexistentSignal = syscall.Signal(-1)