async_geyser

package
v0.0.0-...-c6effd4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrpcPluginEndointConfigEnvName = envConfigPrefix + "GRPC_PLUGIN_ENDPOINT"

	GrpcPluginXTokenConfigEnvName = envConfigPrefix + "GRPC_PLUGIN_X_TOKEN"

	ProgramUpdateWorkerCountConfigEnvName = envConfigPrefix + "PROGRAM_UPDATE_WORKER_COUNT"

	ProgramUpdateQueueSizeConfigEnvName = envConfigPrefix + "PROGRAM_UPDATE_QUEUE_SIZE"

	BackupTimelockWorkerIntervalConfigEnvName = envConfigPrefix + "BACKUP_TIMELOCK_WORKER_INTERVAL"

	BackupExternalDepositWorkerIntervalConfigEnvName = envConfigPrefix + "BACKUP_EXTERNAL_DEPOSIT_WORKER_INTERVAL"
)

Variables

View Source
var (
	ErrTimeoutReceivingUpdate = errors.New("timed out receiving update")
)
View Source
var (
	ErrUnexpectedProgramOwner = errors.New("unexpected program owner")
)

Functions

func New

func New(data code_data.Provider, vmIndexerClient indexerpb.IndexerClient, configProvider ConfigProvider) async.Service

Types

type ConfigProvider

type ConfigProvider func() *conf

ConfigProvider defines how config values are pulled

func WithEnvConfigs

func WithEnvConfigs() ConfigProvider

WithEnvConfigs returns configuration pulled from environment variables

type ProgramAccountUpdateHandler

type ProgramAccountUpdateHandler interface {
	// Handle handles account updates from Geyser. Updates are not guaranteed
	// to come in order. Implementations must be idempotent and should not
	// trust the account data passed in. Always refer to finalized blockchain
	// state from another RPC provider.
	Handle(ctx context.Context, update *geyserpb.SubscribeUpdateAccount) error
}

func NewTokenProgramAccountHandler

func NewTokenProgramAccountHandler(conf *conf, data code_data.Provider, vmIndexerClient indexerpb.IndexerClient) ProgramAccountUpdateHandler

type TokenProgramAccountHandler

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

func (*TokenProgramAccountHandler) Handle

todo: This needs to handle swaps

Directories

Path Synopsis
api
gen

Jump to

Keyboard shortcuts

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