scheduler

package
v0.0.0-...-eec4b17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainClient

type ChainClient interface {
	AccAddress() string
	HasFeeGrant(granteeAddress string, granterAddress string) (bool, error)
	HasGrantedMsgGrantAllowanceAuthorization(appAddress string) (bool, error)
	BroadcastTxCommit(data *wallettypes.TransactionData) (*sdk.TxResponse, error)
}

type Context

type Context struct {
	ChainClient    ChainClient
	FirebaseClient Firebase
	Database       Database
}

Context contains all the data used in order to build and run a Scheduler instance

type Database

type Database interface {
	GetApp(appID string) (*types.Application, bool, error)

	GetNotGrantedFeeGrantRequests(limit int) ([]types.FeeGrantRequest, error)
	SetFeeGrantRequestsGranted(ids []string) error
}

type Firebase

type Firebase interface {
	SendNotificationToApp(appID string, notification types.Notification) error
}

type OperationRegistrar

type OperationRegistrar func(context Context, scheduler *gocron.Scheduler)

type Scheduler

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

func New

func New(context Context) *Scheduler

func (*Scheduler) SetOperationsRegistrar

func (r *Scheduler) SetOperationsRegistrar(registrar OperationRegistrar)

func (*Scheduler) StartAsync

func (r *Scheduler) StartAsync()

func (*Scheduler) Stop

func (r *Scheduler) Stop()

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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