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

epoch

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApproximateSlotDuration = 400 * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder

type Finder interface {
	ApproximateAtTime(ctx context.Context, target time.Time) (uint64, error)
}

func NewFinder

func NewFinder(log *slog.Logger, client SolanaRPCClient) (Finder, error)

func NewFinderWithNowFn

func NewFinderWithNowFn(log *slog.Logger, client SolanaRPCClient, nowFn func() time.Time) (Finder, error)

type SolanaRPCClient

type SolanaRPCClient interface {
	GetSlot(ctx context.Context, commitment solanarpc.CommitmentType) (out uint64, err error)
	GetEpochSchedule(ctx context.Context) (out *solanarpc.GetEpochScheduleResult, err error)
}

Jump to

Keyboard shortcuts

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