message

package
v1.3.38 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDirectConnectionMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDirectConnectionMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDirectConnectionMessage = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type DirectConnectionInfo added in v1.3.37

type DirectConnectionInfo struct {
	ShardId string `protobuf:"bytes,1,opt,name=ShardId,proto3" json:"shardId"`
}

DirectConnectionInfo represents the data regarding a new direct connection`s info

func (*DirectConnectionInfo) Descriptor added in v1.3.37

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

func (*DirectConnectionInfo) Equal added in v1.3.37

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

func (*DirectConnectionInfo) GetShardId added in v1.3.37

func (m *DirectConnectionInfo) GetShardId() string

func (*DirectConnectionInfo) GoString added in v1.3.37

func (this *DirectConnectionInfo) GoString() string

func (*DirectConnectionInfo) Marshal added in v1.3.37

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

func (*DirectConnectionInfo) MarshalTo added in v1.3.37

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

func (*DirectConnectionInfo) MarshalToSizedBuffer added in v1.3.37

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

func (*DirectConnectionInfo) ProtoMessage added in v1.3.37

func (*DirectConnectionInfo) ProtoMessage()

func (*DirectConnectionInfo) Reset added in v1.3.37

func (m *DirectConnectionInfo) Reset()

func (*DirectConnectionInfo) Size added in v1.3.37

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

func (*DirectConnectionInfo) String added in v1.3.37

func (this *DirectConnectionInfo) String() string

func (*DirectConnectionInfo) Unmarshal added in v1.3.37

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

func (*DirectConnectionInfo) XXX_DiscardUnknown added in v1.3.37

func (m *DirectConnectionInfo) XXX_DiscardUnknown()

func (*DirectConnectionInfo) XXX_Marshal added in v1.3.37

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

func (*DirectConnectionInfo) XXX_Merge added in v1.3.37

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

func (*DirectConnectionInfo) XXX_Size added in v1.3.37

func (m *DirectConnectionInfo) XXX_Size() int

func (*DirectConnectionInfo) XXX_Unmarshal added in v1.3.37

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

type Message

type Message struct {
	FromField      []byte
	DataField      []byte
	PayloadField   []byte
	SeqNoField     []byte
	TopicField     string
	SignatureField []byte
	KeyField       []byte
	PeerField      core.PeerID
	TimestampField int64
}

Message is a data holder struct

func (*Message) Data

func (m *Message) Data() []byte

Data returns the useful message that was actually sent

func (*Message) From

func (m *Message) From() []byte

From returns the message originator's peer ID

func (*Message) IsInterfaceNil

func (m *Message) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*Message) Key

func (m *Message) Key() []byte

Key returns the message public key (if it can not be recovered from From field)

func (*Message) Payload added in v1.0.133

func (m *Message) Payload() []byte

Payload returns the encapsulated message along with meta data such as timestamp

func (*Message) Peer

func (m *Message) Peer() core.PeerID

Peer returns the peer that originated the message

func (*Message) SeqNo

func (m *Message) SeqNo() []byte

SeqNo returns the message sequence number

func (*Message) Signature

func (m *Message) Signature() []byte

Signature returns the message signature

func (*Message) Timestamp added in v1.0.133

func (m *Message) Timestamp() int64

Timestamp returns the message timestamp to prevent endless re-processing of the same message

func (*Message) Topic added in v1.1.28

func (m *Message) Topic() string

Topic returns the topic on which the message was sent

Jump to

Keyboard shortcuts

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