Help us shape the future of Go! Take the 2026 Go Developer Survey

mempoolevent

package
v0.123.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 3 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type Type
	Tx   *transaction.Transaction
	Data any
}

Event represents one of mempool events: transaction was added or removed from the mempool.

type Type

type Type byte

Type represents mempool event type.

const (
	// TransactionAdded marks transaction addition mempool event.
	TransactionAdded Type = 0x01
	// TransactionRemoved marks transaction removal mempool event.
	TransactionRemoved Type = 0x02
)

func GetEventTypeFromString

func GetEventTypeFromString(s string) (Type, error)

GetEventTypeFromString converts the input string into the Type if it's possible.

func (Type) MarshalJSON

func (e Type) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Type) String

func (e Type) String() string

String is a Stringer implementation.

func (*Type) UnmarshalJSON

func (e *Type) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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