ordering

package
v1.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: MIT Imports: 4 Imported by: 1

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 *inter.Event) error
	Drop    func(e *inter.Event, peer string, err error)
	Get     func(hash.Event) *inter.EventHeaderData
	Exists  func(hash.Event) bool
	Check   func(e *inter.Event, parents []*inter.EventHeaderData) error
}

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

type EventBuffer

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

func New

func New(buffSize int, callback Callback) *EventBuffer

func (*EventBuffer) Clear

func (buf *EventBuffer) Clear()

func (*EventBuffer) IsBuffered

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

func (*EventBuffer) PushEvent

func (buf *EventBuffer) PushEvent(e *inter.Event, peer string)

Jump to

Keyboard shortcuts

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