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 ¶
var KeywordMetadata = ndn.MakeNameComponent(an.TtKeywordNameComponent, []byte("metadata"))
KeywordMetadata is the 32=metadata component.
Functions ¶
func IsDiscoveryInterest ¶
IsDiscoveryInterest determines whether an Interest is an RDR discovery Interest.
func MakeDiscoveryInterest ¶
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 ¶
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) MarshalBinary ¶
MarshalBinary encodes to TLV-VALUE.
func (*Metadata) UnmarshalBinary ¶
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.