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, integration Integration, 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 Integration ¶
type Integration interface {
OnDepositReceived(ctx context.Context, owner, mint *common.Account, currencyName string, quarksReceived uint64, usdMarketValue float64) error
}
Integration allows for notifications based on events processed by Geyser
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, integration Integration) ProgramAccountUpdateHandler
type TokenProgramAccountHandler ¶
type TokenProgramAccountHandler struct {
// contains filtered or unexported fields
}
func (*TokenProgramAccountHandler) Handle ¶
func (h *TokenProgramAccountHandler) Handle(ctx context.Context, update *geyserpb.SubscribeUpdateAccount) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.