rdr

package
v0.0.0-...-40bead5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: NIST-PD-fallback Imports: 8 Imported by: 0

Documentation

Overview

Package rdr implements Realtime Data Retrieval (RDR) protocol. https://redmine.named-data.net/projects/ndn-tlv/wiki/RDR

Index

Constants

This section is empty.

Variables

View Source
var KeywordMetadata = ndn.MakeNameComponent(an.TtKeywordNameComponent, []byte("metadata"))

KeywordMetadata is the 32=metadata component.

Functions

func IsDiscoveryInterest

func IsDiscoveryInterest(interest ndn.Interest) bool

IsDiscoveryInterest determines whether an Interest is an RDR discovery Interest.

func MakeDiscoveryInterest

func MakeDiscoveryInterest(prefix ndn.Name) ndn.Interest

MakeDiscoveryInterest creates an RDR discovery Interest. KeywordMetadata is appended automatically if it does not exist.

func RetrieveMetadata

func RetrieveMetadata(ctx context.Context, m encoding.BinaryUnmarshaler, name ndn.Name, opts endpoint.ConsumerOptions) error

RetrieveMetadata retrieves RDR metadata.

m: either *Metadata or its derived type.

Types

type Metadata

type Metadata struct {
	Name ndn.Name
}

Metadata contains RDR metadata packet content.

func (*Metadata) Decode

func (m *Metadata) Decode(value []byte, extensions MetadataDecoderMap) error

Decode decodes from TLV-VALUE with extensions.

func (Metadata) Encode

func (m Metadata) Encode(extensions ...tlv.Fielder) (value []byte, e error)

Encode encodes to TLV-VALUE with extensions.

func (Metadata) MarshalBinary

func (m Metadata) MarshalBinary() (value []byte, e error)

MarshalBinary encodes to TLV-VALUE.

func (*Metadata) UnmarshalBinary

func (m *Metadata) UnmarshalBinary(value []byte) error

UnmarshalBinary decodes from TLV-VALUE.

type MetadataDecoderMap

type MetadataDecoderMap map[uint32]MetadataFieldDecoder

MetadataDecoderMap is a set of MetadataFieldDecoders where each key is a TLV-TYPE.

type MetadataFieldDecoder

type MetadataFieldDecoder func(de tlv.DecodingElement) error

MetadataFieldDecoder is a callback function to decode a Metadata extension TLV.

Directories

Path Synopsis
Package ndn6file implements ndn6-file-server protocol.
Package ndn6file implements ndn6-file-server protocol.

Jump to

Keyboard shortcuts

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