Documentation ¶
Overview ¶
@generated by the gondn_tlv_gen, DO NOT modify manually
Index ¶
- Variables
- func CreateGeneralObjNode(node *schema.Node) schema.NodeImpl
- func CreateRdrNode(node *schema.Node) schema.NodeImpl
- func CreateSegmentedNode(node *schema.Node) schema.NodeImpl
- func DataFetcher(mNode schema.MatchedNode, intConfig *ndn.InterestConfig, maxRetries int) schema.NeedResult
- type GeneralObjNode
- func (n *GeneralObjNode) CastTo(ptr any) any
- func (n *GeneralObjNode) NeedCallback(mNode schema.MatchedNode, callback schema.Callback)
- func (n *GeneralObjNode) NeedChan(mNode schema.MatchedNode) chan schema.NeedResult
- func (n *GeneralObjNode) NodeImplTrait() schema.NodeImpl
- func (n *GeneralObjNode) Provide(mNode schema.MatchedNode, content enc.Wire) uint64
- type ManifestData
- type ManifestDataEncoder
- type ManifestDataParsingContext
- type ManifestDigest
- type ManifestDigestEncoder
- type ManifestDigestParsingContext
- type MetaData
- type MetaDataEncoder
- type MetaDataParsingContext
- type RdrNode
- func (n *RdrNode) CastTo(ptr any) any
- func (n *RdrNode) NeedCallback(mNode schema.MatchedNode, callback schema.Callback, version *uint64)
- func (n *RdrNode) NeedChan(mNode schema.MatchedNode, version *uint64) chan schema.NeedResult
- func (n *RdrNode) NodeImplTrait() schema.NodeImpl
- func (n *RdrNode) Provide(mNode schema.MatchedNode, content enc.Wire) uint64
- type RdrPipeline
- type RdrPipelineAdaptive
- type RdrPipelineAimd
- type RdrPipelineCubic
- type RdrPipelineFixed
- type SegmentedNode
- func (n *SegmentedNode) CastTo(ptr any) any
- func (n *SegmentedNode) NeedCallback(mNode schema.MatchedNode, callback schema.Callback, manifest []enc.Buffer) error
- func (n *SegmentedNode) NeedChan(mNode schema.MatchedNode, manifest []enc.Buffer) chan schema.NeedResult
- func (n *SegmentedNode) NodeImplTrait() schema.NodeImpl
- func (n *SegmentedNode) Provide(mNode schema.MatchedNode, content enc.Wire, needManifest bool) any
- func (n *SegmentedNode) SinglePacketPipeline(mNode schema.MatchedNode, callback schema.Callback, manifest []enc.Buffer)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RdrNodeDesc *schema.NodeImplDesc SegmentedNodeDesc *schema.NodeImplDesc GeneralObjNodeDesc *schema.NodeImplDesc )
Functions ¶
func DataFetcher ¶ added in v0.0.4
func DataFetcher(mNode schema.MatchedNode, intConfig *ndn.InterestConfig, maxRetries int) schema.NeedResult
DataFetcher tries to get specified Data packet up to `maxRetries` times.
Types ¶
type GeneralObjNode ¶
type GeneralObjNode struct { schema.BaseNodeImpl MetaFreshness time.Duration MaxRetriesForMeta uint64 ManifestFreshness time.Duration MaxRetriesForManifest uint64 }
GeneralObject in CNL
func (*GeneralObjNode) CastTo ¶
func (n *GeneralObjNode) CastTo(ptr any) any
func (*GeneralObjNode) NeedCallback ¶
func (n *GeneralObjNode) NeedCallback(mNode schema.MatchedNode, callback schema.Callback)
func (*GeneralObjNode) NeedChan ¶
func (n *GeneralObjNode) NeedChan(mNode schema.MatchedNode) chan schema.NeedResult
func (*GeneralObjNode) NodeImplTrait ¶
func (n *GeneralObjNode) NodeImplTrait() schema.NodeImpl
func (*GeneralObjNode) Provide ¶
func (n *GeneralObjNode) Provide(mNode schema.MatchedNode, content enc.Wire) uint64
type ManifestData ¶
type ManifestData struct { //+field:sequence:*ManifestDigest:struct:ManifestDigest Entries []*ManifestDigest `tlv:"0xca"` }
func ParseManifestData ¶
func ParseManifestData(reader enc.ParseReader, ignoreCritical bool) (*ManifestData, error)
func (*ManifestData) Bytes ¶
func (value *ManifestData) Bytes() []byte
func (*ManifestData) Encode ¶
func (value *ManifestData) Encode() enc.Wire
type ManifestDataEncoder ¶
type ManifestDataEncoder struct { Entries_subencoder []struct { Entries_encoder ManifestDigestEncoder } // contains filtered or unexported fields }
func (*ManifestDataEncoder) Encode ¶
func (encoder *ManifestDataEncoder) Encode(value *ManifestData) enc.Wire
func (*ManifestDataEncoder) EncodeInto ¶
func (encoder *ManifestDataEncoder) EncodeInto(value *ManifestData, buf []byte)
func (*ManifestDataEncoder) Init ¶
func (encoder *ManifestDataEncoder) Init(value *ManifestData)
type ManifestDataParsingContext ¶
type ManifestDataParsingContext struct {
Entries_context ManifestDigestParsingContext
}
func (*ManifestDataParsingContext) Init ¶
func (context *ManifestDataParsingContext) Init()
func (*ManifestDataParsingContext) Parse ¶
func (context *ManifestDataParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*ManifestData, error)
type ManifestDigest ¶
type ManifestDigest struct { //+field:natural SegNo uint64 `tlv:"0xcc"` //+field:binary Digest []byte `tlv:"0xce"` }
func ParseManifestDigest ¶
func ParseManifestDigest(reader enc.ParseReader, ignoreCritical bool) (*ManifestDigest, error)
func (*ManifestDigest) Bytes ¶
func (value *ManifestDigest) Bytes() []byte
func (*ManifestDigest) Encode ¶
func (value *ManifestDigest) Encode() enc.Wire
type ManifestDigestEncoder ¶
type ManifestDigestEncoder struct {
// contains filtered or unexported fields
}
func (*ManifestDigestEncoder) Encode ¶
func (encoder *ManifestDigestEncoder) Encode(value *ManifestDigest) enc.Wire
func (*ManifestDigestEncoder) EncodeInto ¶
func (encoder *ManifestDigestEncoder) EncodeInto(value *ManifestDigest, buf []byte)
func (*ManifestDigestEncoder) Init ¶
func (encoder *ManifestDigestEncoder) Init(value *ManifestDigest)
type ManifestDigestParsingContext ¶
type ManifestDigestParsingContext struct { }
func (*ManifestDigestParsingContext) Init ¶
func (context *ManifestDigestParsingContext) Init()
func (*ManifestDigestParsingContext) Parse ¶
func (context *ManifestDigestParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*ManifestDigest, error)
type MetaData ¶
type MetaData struct { //+field:name Name enc.Name `tlv:"0x07"` // Versioned Name //+field:binary FinalBlockID []byte `tlv:"0x1a"` //+field:natural:optional SegmentSize *uint64 `tlv:"0xf500"` //+field:natural:optional Size *uint64 `tlv:"0xf502"` //+field:natural:optional Mode *uint64 `tlv:"0xf504"` //+field:natural:optional Atime *uint64 `tlv:"0xf506"` //+field:natural:optional Btime *uint64 `tlv:"0xf508"` //+field:natural:optional Ctime *uint64 `tlv:"0xf50a"` //+field:natural:optional Mtime *uint64 `tlv:"0xf50c"` //+field:string:optional ObjectType *string `tlv:"0xf50e"` }
func ParseMetaData ¶
func ParseMetaData(reader enc.ParseReader, ignoreCritical bool) (*MetaData, error)
type MetaDataEncoder ¶
type MetaDataEncoder struct { Name_length uint // contains filtered or unexported fields }
func (*MetaDataEncoder) EncodeInto ¶
func (encoder *MetaDataEncoder) EncodeInto(value *MetaData, buf []byte)
func (*MetaDataEncoder) Init ¶
func (encoder *MetaDataEncoder) Init(value *MetaData)
type MetaDataParsingContext ¶
type MetaDataParsingContext struct { }
func (*MetaDataParsingContext) Init ¶
func (context *MetaDataParsingContext) Init()
func (*MetaDataParsingContext) Parse ¶
func (context *MetaDataParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*MetaData, error)
type RdrNode ¶
type RdrNode struct { schema.BaseNodeImpl MetaFreshness time.Duration MaxRetriesForMeta uint64 }
RdrNode handles the version discovery
func (*RdrNode) NeedCallback ¶
func (*RdrNode) NeedChan ¶
func (n *RdrNode) NeedChan(mNode schema.MatchedNode, version *uint64) chan schema.NeedResult
func (*RdrNode) NodeImplTrait ¶
type RdrPipeline ¶ added in v0.0.4
type RdrPipeline interface { }
type RdrPipelineAdaptive ¶ added in v0.0.4
type RdrPipelineAimd ¶ added in v0.0.4
type RdrPipelineAimd struct { RdrPipelineAdaptive AiStep float64 MdCoef float64 ResetCwndToInit bool }
type RdrPipelineCubic ¶ added in v0.0.4
type RdrPipelineCubic struct { RdrPipelineAdaptive CubicBeta float64 EnableFastConv bool }
type RdrPipelineFixed ¶ added in v0.0.4
type RdrPipelineFixed struct {
MaxPipelineSize uint64
}
func (*RdrPipelineFixed) Run ¶ added in v0.0.4
func (p *RdrPipelineFixed) Run(mNode schema.MatchedNode, callback schema.Callback, manifest []enc.Buffer)
Run executes the pipeline in a standalone goroutine with blocking setting.
type SegmentedNode ¶
type SegmentedNode struct { schema.BaseNodeImpl ContentType ndn.ContentType Freshness time.Duration ValidDur time.Duration Lifetime time.Duration MustBeFresh bool SegmentSize uint64 MaxRetriesOnFailure uint64 Pipeline string }
SegmentedNode handles the segmentation and reassembly
func (*SegmentedNode) CastTo ¶
func (n *SegmentedNode) CastTo(ptr any) any
func (*SegmentedNode) NeedCallback ¶
func (n *SegmentedNode) NeedCallback( mNode schema.MatchedNode, callback schema.Callback, manifest []enc.Buffer) error
func (*SegmentedNode) NeedChan ¶
func (n *SegmentedNode) NeedChan(mNode schema.MatchedNode, manifest []enc.Buffer) chan schema.NeedResult
func (*SegmentedNode) NodeImplTrait ¶
func (n *SegmentedNode) NodeImplTrait() schema.NodeImpl
func (*SegmentedNode) Provide ¶
func (n *SegmentedNode) Provide(mNode schema.MatchedNode, content enc.Wire, needManifest bool) any
func (*SegmentedNode) SinglePacketPipeline ¶
func (n *SegmentedNode) SinglePacketPipeline( mNode schema.MatchedNode, callback schema.Callback, manifest []enc.Buffer, )
Click to show internal directories.
Click to hide internal directories.