interfaces

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata interface {
	SequenceNumber() uint64
	AttnetsBitfield() bitfield.Bitvector64
	InnerObject() interface{}
	IsNil() bool
	Copy() Metadata
	MetadataObjV0() *pb.MetaDataV0
	MetadataObjV1() *pb.MetaDataV1
}

Metadata returns the interface of a p2p metadata type.

type MetadataV0

type MetadataV0 struct {
	// contains filtered or unexported fields
}

MetadataV0 is a convenience wrapper around our metadata protobuf object.

func WrappedMetadataV0

func WrappedMetadataV0(md *pb.MetaDataV0) MetadataV0

WrappedMetadataV0 wrappers around the provided protobuf object.

func (MetadataV0) AttnetsBitfield

func (m MetadataV0) AttnetsBitfield() bitfield.Bitvector64

AttnetsBitfield retruns the bitfield stored in the metadata.

func (MetadataV0) Copy

func (m MetadataV0) Copy() Metadata

Copy performs a full copy of the underlying metadata object.

func (MetadataV0) InnerObject

func (m MetadataV0) InnerObject() interface{}

InnerObject returns the underlying metadata protobuf structure.

func (MetadataV0) IsNil

func (m MetadataV0) IsNil() bool

IsNil checks for the nilness of the underlying object.

func (MetadataV0) MetadataObjV0

func (m MetadataV0) MetadataObjV0() *pb.MetaDataV0

MetadataObjV0 returns the inner metadata object in its type specified form. If it doesn't exist then we return nothing.

func (MetadataV0) MetadataObjV1

func (m MetadataV0) MetadataObjV1() *pb.MetaDataV1

MetadataObjV1 returns the inner metatdata object in its type specified form. If it doesn't exist then we return nothing.

func (MetadataV0) SequenceNumber

func (m MetadataV0) SequenceNumber() uint64

SequenceNumber returns the sequence number from the metadata.

type MetadataV1

type MetadataV1 struct {
	// contains filtered or unexported fields
}

MetadataV1 is a convenience wrapper around our metadata v2 protobuf object.

func WrappedMetadataV1

func WrappedMetadataV1(md *pb.MetaDataV1) MetadataV1

WrappedMetadataV1 wrappers around the provided protobuf object.

func (MetadataV1) AttnetsBitfield

func (m MetadataV1) AttnetsBitfield() bitfield.Bitvector64

AttnetsBitfield retruns the bitfield stored in the metadata.

func (MetadataV1) Copy

func (m MetadataV1) Copy() Metadata

Copy performs a full copy of the underlying metadata object.

func (MetadataV1) InnerObject

func (m MetadataV1) InnerObject() interface{}

InnerObject returns the underlying metadata protobuf structure.

func (MetadataV1) IsNil

func (m MetadataV1) IsNil() bool

IsNil checks for the nilness of the underlying object.

func (MetadataV1) MetadataObjV0

func (m MetadataV1) MetadataObjV0() *pb.MetaDataV0

MetadataObjV0 returns the inner metadata object in its type specified form. If it doesn't exist then we return nothing.

func (MetadataV1) MetadataObjV1

func (m MetadataV1) MetadataObjV1() *pb.MetaDataV1

MetadataObjV1 returns the inner metatdata object in its type specified form. If it doesn't exist then we return nothing.

func (MetadataV1) SequenceNumber

func (m MetadataV1) SequenceNumber() uint64

SequenceNumber returns the sequence number from the metadata.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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