common

package
v0.0.0-...-8de788b Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BestRevision      = "best"
	FinalizedRevision = "finalized"
)

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrNot200Status  = errors.New("not 200 status code")
	ErrUnexpectedMsg = errors.New("unexpected message format")
)

Functions

This section is empty.

Types

type EventWrapper

type EventWrapper[T any] struct {
	Data  T
	Error error
}

EventWrapper is used to return errors from the websocket alongside the data

type Subscription

type Subscription[T any] struct {
	EventChan   <-chan EventWrapper[T]
	Unsubscribe func()
}

Subscription is used to handle the active subscription

Jump to

Keyboard shortcuts

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