chainsched

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeAPI

type NodeAPI interface {
	ChainHead(context.Context) (*types.TipSet, error)
	ChainNotify(context.Context) (<-chan []*api.HeadChange, error)
}

type Option

type Option func(*Scheduler)

func WithClock

func WithClock(clock clock.Clock) Option

type Scheduler

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

func New

func New(api NodeAPI, opts ...Option) (*Scheduler, error)

func (*Scheduler) AddHandler

func (s *Scheduler) AddHandler(ch UpdateFunc) error

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context)

Run subscribes to chain notifications and processes them until the context is cancelled

type UpdateFunc

type UpdateFunc func(ctx context.Context, revert, apply *types.TipSet) error

Jump to

Keyboard shortcuts

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