Documentation
¶
Index ¶
- type Intervals
- func (i *Intervals) Add(start, end uint64)
- func (i *Intervals) Last() (end uint64)
- func (i *Intervals) MarshalBinary() (data []byte, err error)
- func (i *Intervals) Merge(m *Intervals)
- func (i *Intervals) Next() (start, end uint64)
- func (i *Intervals) String() string
- func (i *Intervals) UnmarshalBinary(data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Intervals ¶
type Intervals struct {
// contains filtered or unexported fields
}
间隔存储间隔列表。其目的是提供 方法添加新间隔并检索 需要添加。 它可以用于流数据的同步以保持 已检索到会话之间的数据范围。
func NewIntervals ¶
新建创建间隔的新实例。 start参数限制间隔的下限。 添加方法或将不添加以下开始绑定的范围 由下一个方法返回。此限制可用于 跟踪“实时”同步,其中同步会话 从特定值开始,如果“实时”同步间隔 需要与历史相结合,才能安全地完成。
func (*Intervals) MarshalBinary ¶
marshalbinary将间隔参数编码为分号分隔列表。 列表中的第一个元素是base36编码的起始值。以下 元素是由逗号分隔的两个base36编码值范围。
func (*Intervals) Next ¶
Next返回未完成的第一个范围间隔。返回 起始值和结束值都包含在内,这意味着整个范围 包括开始和结束需要增加,以填补差距 每隔一段时间。 如果下一个间隔在整数之后,则end的返回值为0 以间隔存储的范围。零结束值表示无限制 在下一个间隔长度。
func (*Intervals) UnmarshalBinary ¶
unmarshalbinary根据interval.marshalbinary格式解码数据。
Click to show internal directories.
Click to hide internal directories.