data

package
v0.0.0-...-0583f8e Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMinTimeGap  = 50 * time.Millisecond
	DefaultRollerLimit = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Roller

type Roller struct {
	MinTimeGap time.Duration
	// contains filtered or unexported fields
}

func NewRoller

func NewRoller(minTimeGap time.Duration, limit int) *Roller

func (*Roller) Clear

func (r *Roller) Clear()

func (*Roller) Do

func (r *Roller) Do(fnc func(packet.RocketPacket))

func (*Roller) Last

func (r *Roller) Last() packet.RocketPacket

func (*Roller) Len

func (r *Roller) Len() int

func (*Roller) Limit

func (r *Roller) Limit() int

func (*Roller) OnData

func (r *Roller) OnData(packets []packet.RocketPacket)

func (*Roller) SetLimit

func (r *Roller) SetLimit(limit int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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