data

package
v1.1.66 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHeartbeat        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHeartbeat          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHeartbeat = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type DbTimeStamp

type DbTimeStamp struct {
	Timestamp int64 `protobuf:"varint,1,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"`
}

func (*DbTimeStamp) Descriptor

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

func (*DbTimeStamp) Equal

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

func (*DbTimeStamp) GetTimestamp

func (m *DbTimeStamp) GetTimestamp() int64

func (*DbTimeStamp) GoString

func (this *DbTimeStamp) GoString() string

func (*DbTimeStamp) Marshal

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

func (*DbTimeStamp) MarshalTo

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

func (*DbTimeStamp) MarshalToSizedBuffer

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

func (*DbTimeStamp) ProtoMessage

func (*DbTimeStamp) ProtoMessage()

func (*DbTimeStamp) Reset

func (m *DbTimeStamp) Reset()

func (*DbTimeStamp) Size

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

func (*DbTimeStamp) String

func (this *DbTimeStamp) String() string

func (*DbTimeStamp) Unmarshal

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

func (*DbTimeStamp) XXX_DiscardUnknown

func (m *DbTimeStamp) XXX_DiscardUnknown()

func (*DbTimeStamp) XXX_Marshal

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

func (*DbTimeStamp) XXX_Merge

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

func (*DbTimeStamp) XXX_Size

func (m *DbTimeStamp) XXX_Size() int

func (*DbTimeStamp) XXX_Unmarshal

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

type Duration

type Duration struct {
	time.Duration
}

Duration is a wrapper of the original Duration struct that has JSON marshal and unmarshal capabilities golang issue: https://github.com/golang/go/issues/10275

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON is called when a json marshal is triggered on this field

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

UnmarshalJSON is called when a json unmarshal is triggered on this field

type Heartbeat

type Heartbeat struct {
	Payload         []byte `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"`
	Pubkey          []byte `protobuf:"bytes,2,opt,name=Pubkey,proto3" json:"Pubkey,omitempty"`
	Signature       []byte `protobuf:"bytes,3,opt,name=Signature,proto3" json:"Signature,omitempty"`
	ShardID         uint32 `protobuf:"varint,4,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	VersionNumber   string `protobuf:"bytes,5,opt,name=VersionNumber,proto3" json:"VersionNumber,omitempty"`
	NodeDisplayName string `protobuf:"bytes,6,opt,name=NodeDisplayName,proto3" json:"NodeDisplayName,omitempty"`
	Identity        string `protobuf:"bytes,7,opt,name=Identity,proto3" json:"Identity,omitempty"`
	Pid             []byte `protobuf:"bytes,8,opt,name=Pid,proto3" json:"Pid,omitempty"`
	Nonce           uint64 `protobuf:"varint,9,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
}

Heartbeat represents the heartbeat message that is sent between peers

func (*Heartbeat) Descriptor

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

func (*Heartbeat) Equal

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

func (*Heartbeat) GetIdentity

func (m *Heartbeat) GetIdentity() string

func (*Heartbeat) GetNodeDisplayName

func (m *Heartbeat) GetNodeDisplayName() string

func (*Heartbeat) GetNonce

func (m *Heartbeat) GetNonce() uint64

func (*Heartbeat) GetPayload

func (m *Heartbeat) GetPayload() []byte

func (*Heartbeat) GetPid

func (m *Heartbeat) GetPid() []byte

func (*Heartbeat) GetPubkey

func (m *Heartbeat) GetPubkey() []byte

func (*Heartbeat) GetShardID

func (m *Heartbeat) GetShardID() uint32

func (*Heartbeat) GetSignature

func (m *Heartbeat) GetSignature() []byte

func (*Heartbeat) GetVersionNumber

func (m *Heartbeat) GetVersionNumber() string

func (*Heartbeat) GoString

func (this *Heartbeat) GoString() string

func (*Heartbeat) Marshal

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

func (*Heartbeat) MarshalTo

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

func (*Heartbeat) MarshalToSizedBuffer

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

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) Reset

func (m *Heartbeat) Reset()

func (*Heartbeat) Size

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

func (*Heartbeat) String

func (this *Heartbeat) String() string

func (*Heartbeat) Unmarshal

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

func (*Heartbeat) XXX_DiscardUnknown

func (m *Heartbeat) XXX_DiscardUnknown()

func (*Heartbeat) XXX_Marshal

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

func (*Heartbeat) XXX_Merge

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

func (*Heartbeat) XXX_Size

func (m *Heartbeat) XXX_Size() int

func (*Heartbeat) XXX_Unmarshal

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

type HeartbeatDTO

type HeartbeatDTO struct {
	MaxDurationPeerUnresponsive int64  `protobuf:"varint,1,opt,name=MaxDurationPeerUnresponsive,proto3" json:"MaxDurationPeerUnresponsive,omitempty"`
	MaxInactiveTime             int64  `protobuf:"varint,2,opt,name=MaxInactiveTime,proto3" json:"MaxInactiveTime,omitempty"`
	TotalUpTime                 int64  `protobuf:"varint,3,opt,name=TotalUpTime,proto3" json:"TotalUpTime,omitempty"`
	TotalDownTime               int64  `protobuf:"varint,4,opt,name=TotalDownTime,proto3" json:"TotalDownTime,omitempty"`
	TimeStamp                   int64  `protobuf:"varint,5,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"`
	IsActive                    bool   `protobuf:"varint,6,opt,name=IsActive,proto3" json:"IsActive,omitempty"`
	ReceivedShardID             uint32 `protobuf:"varint,7,opt,name=ReceivedShardID,proto3" json:"ReceivedShardID,omitempty"`
	ComputedShardID             uint32 `protobuf:"varint,8,opt,name=ComputedShardID,proto3" json:"ComputedShardID,omitempty"`
	VersionNumber               string `protobuf:"bytes,9,opt,name=VersionNumber,proto3" json:"VersionNumber,omitempty"`
	NodeDisplayName             string `protobuf:"bytes,10,opt,name=NodeDisplayName,proto3" json:"NodeDisplayName,omitempty"`
	PeerType                    string `protobuf:"bytes,11,opt,name=PeerType,proto3" json:"PeerType,omitempty"`
	Identity                    string `protobuf:"bytes,12,opt,name=Identity,proto3" json:"Identity,omitempty"`
	IsValidator                 bool   `protobuf:"varint,13,opt,name=IsValidator,proto3" json:"IsValidator,omitempty"`
	LastUptimeDowntime          int64  `protobuf:"varint,14,opt,name=LastUptimeDowntime,proto3" json:"LastUptimeDowntime,omitempty"`
	GenesisTime                 int64  `protobuf:"varint,15,opt,name=GenesisTime,proto3" json:"GenesisTime,omitempty"`
	Nonce                       uint64 `protobuf:"varint,16,opt,name=Nonce,proto3" json:"Nonce,omitempty"`
	NumInstances                uint64 `protobuf:"varint,17,opt,name=NumInstances,proto3" json:"NumInstances,omitempty"`
}

HeartbeatDTO is the struct used for handling DB operations for heartbeatMessageInfo struct

func (*HeartbeatDTO) Descriptor

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

func (*HeartbeatDTO) Equal

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

func (*HeartbeatDTO) GetComputedShardID

func (m *HeartbeatDTO) GetComputedShardID() uint32

func (*HeartbeatDTO) GetGenesisTime

func (m *HeartbeatDTO) GetGenesisTime() int64

func (*HeartbeatDTO) GetIdentity

func (m *HeartbeatDTO) GetIdentity() string

func (*HeartbeatDTO) GetIsActive

func (m *HeartbeatDTO) GetIsActive() bool

func (*HeartbeatDTO) GetIsValidator

func (m *HeartbeatDTO) GetIsValidator() bool

func (*HeartbeatDTO) GetLastUptimeDowntime

func (m *HeartbeatDTO) GetLastUptimeDowntime() int64

func (*HeartbeatDTO) GetMaxDurationPeerUnresponsive

func (m *HeartbeatDTO) GetMaxDurationPeerUnresponsive() int64

func (*HeartbeatDTO) GetMaxInactiveTime

func (m *HeartbeatDTO) GetMaxInactiveTime() int64

func (*HeartbeatDTO) GetNodeDisplayName

func (m *HeartbeatDTO) GetNodeDisplayName() string

func (*HeartbeatDTO) GetNonce

func (m *HeartbeatDTO) GetNonce() uint64

func (*HeartbeatDTO) GetNumInstances

func (m *HeartbeatDTO) GetNumInstances() uint64

func (*HeartbeatDTO) GetPeerType

func (m *HeartbeatDTO) GetPeerType() string

func (*HeartbeatDTO) GetReceivedShardID

func (m *HeartbeatDTO) GetReceivedShardID() uint32

func (*HeartbeatDTO) GetTimeStamp

func (m *HeartbeatDTO) GetTimeStamp() int64

func (*HeartbeatDTO) GetTotalDownTime

func (m *HeartbeatDTO) GetTotalDownTime() int64

func (*HeartbeatDTO) GetTotalUpTime

func (m *HeartbeatDTO) GetTotalUpTime() int64

func (*HeartbeatDTO) GetVersionNumber

func (m *HeartbeatDTO) GetVersionNumber() string

func (*HeartbeatDTO) GoString

func (this *HeartbeatDTO) GoString() string

func (*HeartbeatDTO) Marshal

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

func (*HeartbeatDTO) MarshalTo

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

func (*HeartbeatDTO) MarshalToSizedBuffer

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

func (*HeartbeatDTO) ProtoMessage

func (*HeartbeatDTO) ProtoMessage()

func (*HeartbeatDTO) Reset

func (m *HeartbeatDTO) Reset()

func (*HeartbeatDTO) Size

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

func (*HeartbeatDTO) String

func (this *HeartbeatDTO) String() string

func (*HeartbeatDTO) Unmarshal

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

func (*HeartbeatDTO) XXX_DiscardUnknown

func (m *HeartbeatDTO) XXX_DiscardUnknown()

func (*HeartbeatDTO) XXX_Marshal

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

func (*HeartbeatDTO) XXX_Merge

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

func (*HeartbeatDTO) XXX_Size

func (m *HeartbeatDTO) XXX_Size() int

func (*HeartbeatDTO) XXX_Unmarshal

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

type PubKeyHeartbeat

type PubKeyHeartbeat struct {
	PublicKey       string    `json:"publicKey"`
	TimeStamp       time.Time `json:"timeStamp"`
	MaxInactiveTime Duration  `json:"maxInactiveTime"`
	IsActive        bool      `json:"isActive"`
	ReceivedShardID uint32    `json:"receivedShardID"`
	ComputedShardID uint32    `json:"computedShardID"`
	TotalUpTime     int64     `json:"totalUpTimeSec"`
	TotalDownTime   int64     `json:"totalDownTimeSec"`
	VersionNumber   string    `json:"versionNumber"`
	NodeDisplayName string    `json:"nodeDisplayName"`
	Identity        string    `json:"identity"`
	PeerType        string    `json:"peerType"`
	Nonce           uint64    `json:"nonce"`
	NumInstances    uint64    `json:"numInstances"`
}

PubKeyHeartbeat returns the heartbeat status for a public key

Jump to

Keyboard shortcuts

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