config

package
v0.0.0-...-b21e8ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type ProtocolConfig

type ProtocolConfig struct {
	ElectionTimeout   *time.Duration `protobuf:"bytes,1,opt,name=election_timeout,json=electionTimeout,proto3,stdduration" json:"election_timeout,omitempty"`
	HeartbeatInterval *time.Duration `protobuf:"bytes,2,opt,name=heartbeat_interval,json=heartbeatInterval,proto3,stdduration" json:"heartbeat_interval,omitempty"`
	SnapshotInterval  *time.Duration `protobuf:"bytes,3,opt,name=snapshot_interval,json=snapshotInterval,proto3,stdduration" json:"snapshot_interval,omitempty"`
	SnapshotThreshold uint64         `protobuf:"varint,4,opt,name=snapshot_threshold,json=snapshotThreshold,proto3" json:"snapshot_threshold,omitempty"`
}

func NewPopulatedProtocolConfig

func NewPopulatedProtocolConfig(r randyConfig, easy bool) *ProtocolConfig

func (*ProtocolConfig) Descriptor

func (*ProtocolConfig) Descriptor() ([]byte, []int)

func (*ProtocolConfig) Equal

func (this *ProtocolConfig) Equal(that interface{}) bool

func (*ProtocolConfig) GetElectionTimeout

func (m *ProtocolConfig) GetElectionTimeout() *time.Duration

func (*ProtocolConfig) GetElectionTimeoutOrDefault

func (c *ProtocolConfig) GetElectionTimeoutOrDefault() time.Duration

GetElectionTimeoutOrDefault returns the configured election timeout if set, otherwise the default election timeout

func (*ProtocolConfig) GetHeartbeatInterval

func (m *ProtocolConfig) GetHeartbeatInterval() *time.Duration

func (*ProtocolConfig) GetHeartbeatIntervalOrDefault

func (c *ProtocolConfig) GetHeartbeatIntervalOrDefault() time.Duration

GetHeartbeatIntervalOrDefault returns the configured heartbeat interval if set, otherwise the default heartbeat interval

func (*ProtocolConfig) GetSnapshotInterval

func (m *ProtocolConfig) GetSnapshotInterval() *time.Duration

func (*ProtocolConfig) GetSnapshotIntervalOrDefault

func (c *ProtocolConfig) GetSnapshotIntervalOrDefault() time.Duration

GetSnapshotIntervalOrDefault returns the configured snapshot interval if set, otherwise the default snapshot interval

func (*ProtocolConfig) GetSnapshotThreshold

func (m *ProtocolConfig) GetSnapshotThreshold() uint64

func (*ProtocolConfig) GetSnapshotThresholdOrDefault

func (c *ProtocolConfig) GetSnapshotThresholdOrDefault() uint64

GetSnapshotThresholdOrDefault returns the configured snapshot threshold if set, otherwise the default snapshot threshold

func (*ProtocolConfig) Marshal

func (m *ProtocolConfig) Marshal() (dAtA []byte, err error)

func (*ProtocolConfig) MarshalTo

func (m *ProtocolConfig) MarshalTo(dAtA []byte) (int, error)

func (*ProtocolConfig) MarshalToSizedBuffer

func (m *ProtocolConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProtocolConfig) ProtoMessage

func (*ProtocolConfig) ProtoMessage()

func (*ProtocolConfig) Reset

func (m *ProtocolConfig) Reset()

func (*ProtocolConfig) Size

func (m *ProtocolConfig) Size() (n int)

func (*ProtocolConfig) String

func (m *ProtocolConfig) String() string

func (*ProtocolConfig) Unmarshal

func (m *ProtocolConfig) Unmarshal(dAtA []byte) error

func (*ProtocolConfig) XXX_DiscardUnknown

func (m *ProtocolConfig) XXX_DiscardUnknown()

func (*ProtocolConfig) XXX_Marshal

func (m *ProtocolConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProtocolConfig) XXX_Merge

func (m *ProtocolConfig) XXX_Merge(src proto.Message)

func (*ProtocolConfig) XXX_Size

func (m *ProtocolConfig) XXX_Size() int

func (*ProtocolConfig) XXX_Unmarshal

func (m *ProtocolConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL