dagordering

package
v0.0.1-dev Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback struct {
	Process  func(e dag.Event) error
	Released func(e dag.Event, peer string, err error)
	Get      func(hash.Event) dag.Event
	Exists   func(hash.Event) bool
	Check    func(e dag.Event, parents dag.Events) error
}

Callback is a set of EventsBuffer()'s args.

type EventsBuffer

type EventsBuffer struct {
	// contains filtered or unexported fields
}

func New

func New(limit dag.Metric, callback Callback) *EventsBuffer

func (*EventsBuffer) Clear

func (buf *EventsBuffer) Clear()

func (*EventsBuffer) IsBuffered

func (buf *EventsBuffer) IsBuffered(id hash.Event) bool

func (*EventsBuffer) PushEvent

func (buf *EventsBuffer) PushEvent(de dag.Event, peer string) (complete bool)

func (*EventsBuffer) Total

func (buf *EventsBuffer) Total() dag.Metric

Total returns the total weight and number of items in the cache.

Jump to

Keyboard shortcuts

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