gfspp2p

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Amino     = codec.NewLegacyAmino()
	ModuleCdc = codec.NewAminoCodec(Amino)
)
View Source
var (
	ErrInvalidLengthP2P        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowP2P          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupP2P = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

Types

type GfSpNode added in v0.2.4

type GfSpNode struct {
	// node_id defines the node id
	NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// multi_addr define the node multi addr
	MultiAddr []string `protobuf:"bytes,2,rep,name=multi_addr,json=multiAddr,proto3" json:"multi_addr,omitempty"`
}

Node defines the p2p node info

func (*GfSpNode) Descriptor added in v0.2.4

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

func (*GfSpNode) GetMultiAddr added in v0.2.4

func (m *GfSpNode) GetMultiAddr() []string

func (*GfSpNode) GetNodeId added in v0.2.4

func (m *GfSpNode) GetNodeId() string

func (*GfSpNode) Marshal added in v0.2.4

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

func (*GfSpNode) MarshalTo added in v0.2.4

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

func (*GfSpNode) MarshalToSizedBuffer added in v0.2.4

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

func (*GfSpNode) ProtoMessage added in v0.2.4

func (*GfSpNode) ProtoMessage()

func (*GfSpNode) Reset added in v0.2.4

func (m *GfSpNode) Reset()

func (*GfSpNode) Size added in v0.2.4

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

func (*GfSpNode) String added in v0.2.4

func (m *GfSpNode) String() string

func (*GfSpNode) Unmarshal added in v0.2.4

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

func (*GfSpNode) XXX_DiscardUnknown added in v0.2.4

func (m *GfSpNode) XXX_DiscardUnknown()

func (*GfSpNode) XXX_Marshal added in v0.2.4

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

func (*GfSpNode) XXX_Merge added in v0.2.4

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

func (*GfSpNode) XXX_Size added in v0.2.4

func (m *GfSpNode) XXX_Size() int

func (*GfSpNode) XXX_Unmarshal added in v0.2.4

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

type GfSpPing added in v0.2.4

type GfSpPing struct {
	// sp_operator_address define sp operator public key
	SpOperatorAddress string `protobuf:"bytes,1,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// signature define the signature of sp sign the msg
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}

Ping defines the heartbeat request between p2p nodes

func (*GfSpPing) Descriptor added in v0.2.4

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

func (*GfSpPing) GetSignBytes added in v0.2.4

func (m *GfSpPing) GetSignBytes() []byte

GetSignBytes returns the ping message bytes to sign over.

func (*GfSpPing) GetSignature added in v0.2.4

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

func (*GfSpPing) GetSpOperatorAddress added in v0.2.4

func (m *GfSpPing) GetSpOperatorAddress() string

func (*GfSpPing) Marshal added in v0.2.4

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

func (*GfSpPing) MarshalTo added in v0.2.4

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

func (*GfSpPing) MarshalToSizedBuffer added in v0.2.4

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

func (*GfSpPing) ProtoMessage added in v0.2.4

func (*GfSpPing) ProtoMessage()

func (*GfSpPing) Reset added in v0.2.4

func (m *GfSpPing) Reset()

func (*GfSpPing) Size added in v0.2.4

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

func (*GfSpPing) String added in v0.2.4

func (m *GfSpPing) String() string

func (*GfSpPing) Unmarshal added in v0.2.4

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

func (*GfSpPing) XXX_DiscardUnknown added in v0.2.4

func (m *GfSpPing) XXX_DiscardUnknown()

func (*GfSpPing) XXX_Marshal added in v0.2.4

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

func (*GfSpPing) XXX_Merge added in v0.2.4

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

func (*GfSpPing) XXX_Size added in v0.2.4

func (m *GfSpPing) XXX_Size() int

func (*GfSpPing) XXX_Unmarshal added in v0.2.4

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

type GfSpPong added in v0.2.4

type GfSpPong struct {
	// nodes define the
	Nodes []*GfSpNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// sp_operator_address define sp operator public key
	SpOperatorAddress string `protobuf:"bytes,2,opt,name=sp_operator_address,json=spOperatorAddress,proto3" json:"sp_operator_address,omitempty"`
	// signature define the signature of sp sign the msg
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
}

Pong defines the heartbeat response between p2p nodes

func (*GfSpPong) Descriptor added in v0.2.4

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

func (*GfSpPong) GetNodes added in v0.2.4

func (m *GfSpPong) GetNodes() []*GfSpNode

func (*GfSpPong) GetSignBytes added in v0.2.4

func (m *GfSpPong) GetSignBytes() []byte

GetSignBytes returns the pong message bytes to sign over.

func (*GfSpPong) GetSignature added in v0.2.4

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

func (*GfSpPong) GetSpOperatorAddress added in v0.2.4

func (m *GfSpPong) GetSpOperatorAddress() string

func (*GfSpPong) Marshal added in v0.2.4

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

func (*GfSpPong) MarshalTo added in v0.2.4

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

func (*GfSpPong) MarshalToSizedBuffer added in v0.2.4

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

func (*GfSpPong) ProtoMessage added in v0.2.4

func (*GfSpPong) ProtoMessage()

func (*GfSpPong) Reset added in v0.2.4

func (m *GfSpPong) Reset()

func (*GfSpPong) Size added in v0.2.4

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

func (*GfSpPong) String added in v0.2.4

func (m *GfSpPong) String() string

func (*GfSpPong) Unmarshal added in v0.2.4

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

func (*GfSpPong) XXX_DiscardUnknown added in v0.2.4

func (m *GfSpPong) XXX_DiscardUnknown()

func (*GfSpPong) XXX_Marshal added in v0.2.4

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

func (*GfSpPong) XXX_Merge added in v0.2.4

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

func (*GfSpPong) XXX_Size added in v0.2.4

func (m *GfSpPong) XXX_Size() int

func (*GfSpPong) XXX_Unmarshal added in v0.2.4

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

Jump to

Keyboard shortcuts

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