events

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ForkDetected    = &FeedOf[struct{}]{}
	NewChainHead    = &FeedOf[*types.Block]{}
	NewMinedBlock   = &FeedOf[*types.Block]{}
	NewNetworkBlock = &FeedOf[*types.Block]{}
	NewNetworkTx    = &FeedOf[types.Tx]{}
	NewTx           = &FeedOf[types.Tx]{}
	SyncStarted     = &FeedOf[struct{}]{}
	SyncFinished    = &FeedOf[struct{}]{}
)

Functions

This section is empty.

Types

type Callback

type Callback[T any] func(data T)

type FeedOf

type FeedOf[T any] struct {
	// contains filtered or unexported fields
}

func (*FeedOf[T]) Send

func (e *FeedOf[T]) Send(data T) (sent int)

func (*FeedOf[T]) Subscribe

func (e *FeedOf[T]) Subscribe(id string, callback Callback[T])

func (*FeedOf[T]) Unsubscribe

func (e *FeedOf[T]) Unsubscribe(id string) *sync.WaitGroup

type Subscription

type Subscription[T any] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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