Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadKeyLen = errors.New("gmaj: key length must be divisible by 8") ErrBadIDLen = errors.New("gmaj: ID length must be key length/8") )
configuration errors
View Source
var DefaultConfig = &Config{ KeySize: dfltKeySize, IDLength: dfltKeySize / 8, FixNextFingerInterval: 50 * time.Millisecond, StabilizeInterval: 100 * time.Millisecond, RetryInterval: 200 * time.Millisecond, DialOptions: []grpc.DialOption{ grpc.WithInsecure(), }, Log: log.New(os.Stderr, "gmaj: ", log.LstdFlags), }
DefaultConfig is the default configuration.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // KeySize is the number of bits (i.e. M value), divisible by 8 KeySize int IDLength int // must be KeyLength/8 FixNextFingerInterval time.Duration StabilizeInterval time.Duration ConnectionTimeout time.Duration RetryInterval time.Duration DialOptions []grpc.DialOption Log grpclog.Logger }
Config contains all the configuration information for a gmaj node.
Click to show internal directories.
Click to hide internal directories.