Documentation
¶
Index ¶
- Constants
- func BoundedRand(min, max time.Duration) time.Duration
- func JitterToBounds(base time.Duration, jitter float64) (time.Duration, time.Duration)
- type BoltDB
- type Constants
- type Core
- type Database
- type HandlingOption
- type HealthConfig
- type HealthSync
- type MissingData
- type NamingScheme
- type NativeConfig
- type NativeSync
- type OneStateCoreConfig
- type Scheduler
- type SharedConfig
- type SharedSync
- type StateVector
- func (sv *StateVector) Encode(formal bool) enc.Wire
- func (sv *StateVector) Entries() *nm.NameMap[uint64]
- func (sv *StateVector) Get(dsstr string) uint64
- func (sv *StateVector) LastUpdated(dsstr string) time.Time
- func (sv *StateVector) Len() int
- func (sv *StateVector) Set(dsstr string, dsname enc.Name, seqno uint64, old bool)
- func (sv *StateVector) String() string
- func (sv *StateVector) Sum() uint64
- func (sv *StateVector) Update(dsstr string)
- type Status
- type StatusChange
- type SyncUpdate
- type Tracker
- type TwoStateCoreConfig
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Constants ¶
type Constants struct {
SyncInterval time.Duration
SuppressionInterval time.Duration
SyncIntervalJitter float64 // percentage variance 0.00<=x<=1.00
SuppressionIntervalJitter float64 // percentage variance 0.00<=x<=1.00
DataInterestLifeTime time.Duration
DataInterestRetries uint // 0 = no retry
DataPacketFreshness time.Duration
SyncInterestLifeTime time.Duration
DataComponent enc.Component
SyncComponent enc.Component
MaxConcurrentDataInterests int32 // 0 = inf
InitialFetchQueueSize uint // only helps to mitigate allocation resizing
InitialMissingChannelSize uint // only helps to mitigate allocation resizing
InitialStatusChangeChannelSize uint // only helps to mitigate allocation resizing
HeartbeatsToRenew uint
HeartbeatsToExpire uint
TrackRate time.Duration
HeartbeatRate time.Duration
MonitorInterval time.Duration
}
func GetDefaultConstants ¶
func GetDefaultConstants() *Constants
type Core ¶
type HandlingOption ¶
type HandlingOption int
const ( NoHandling HandlingOption = 0 SourceCentricHandling HandlingOption = 1 EqualTrafficHandling HandlingOption = 2 )
type HealthConfig ¶
type HealthSync ¶
type HealthSync interface {
Listen()
Activate(bool)
Shutdown()
// TODO: NeedStatus + PublishStatus (publish/pull at a rate)
Core() Core
Tracker() Tracker
}
func NewHealthSync ¶
func NewHealthSync(app *eng.Engine, config *HealthConfig, constants *Constants) HealthSync
type NamingScheme ¶
type NamingScheme int
const ( SourceOrientedNaming NamingScheme = 0 BareSourceOrientedNaming NamingScheme = 1 GroupOrientedNaming NamingScheme = 2 )
type NativeConfig ¶
type NativeSync ¶
type NativeSync interface {
Listen()
Activate(bool)
Shutdown()
NeedData(enc.Name, uint64)
PublishData([]byte)
FeedInterest(ndn.Interest, enc.Wire, enc.Wire, ndn.ReplyFunc, time.Time)
Core() Core
}
func NewNativeSync ¶
func NewNativeSync(app *eng.Engine, config *NativeConfig, constants *Constants) NativeSync
type OneStateCoreConfig ¶
type Scheduler ¶
type Scheduler interface {
ApplyBounds(time.Duration, time.Duration)
Start(bool)
Stop()
Skip()
Reset()
Set(time.Duration)
TimeLeft() time.Duration
}
func NewScheduler ¶
func NewScheduler(function func()) Scheduler
type SharedConfig ¶
type SharedConfig struct {
CacheOthers bool
}
type SharedSync ¶
type SharedSync interface {
}
func NewSharedSync ¶
func NewSharedSync(app *eng.Engine, config *SharedConfig, constants *Constants) SharedSync
type StateVector ¶
func CopyStateVector ¶
func CopyStateVector(sv StateVector) *StateVector
func NewStateVector ¶
func NewStateVector() *StateVector
func ParseStateVector ¶
func ParseStateVector(reader enc.ParseReader, formal bool) (*StateVector, error)
func (*StateVector) Get ¶
func (sv *StateVector) Get(dsstr string) uint64
func (*StateVector) LastUpdated ¶
func (sv *StateVector) LastUpdated(dsstr string) time.Time
func (*StateVector) Len ¶
func (sv *StateVector) Len() int
func (*StateVector) String ¶
func (sv *StateVector) String() string
func (*StateVector) Sum ¶
func (sv *StateVector) Sum() uint64
func (*StateVector) Update ¶
func (sv *StateVector) Update(dsstr string)
type StatusChange ¶
type SyncUpdate ¶
type SyncUpdate []MissingData
type Tracker ¶
type Tracker interface {
Reset(string)
Detect()
Status(string) Status
UntilBeat() time.Duration
Chan() chan StatusChange
}
func NewTracker ¶
Click to show internal directories.
Click to hide internal directories.