watchdog

package
v0.0.0-...-4fc266b Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigStorageEmpty = errors.New("config storage not set")
	ErrAddressPoolNotSet  = errors.New("address pool not set")
	ErrChainClientNotSet  = errors.New("blockchain client not set")
)

Functions

This section is empty.

Types

type BlockEvent

type BlockEvent func(blockNum int64, blockId string)

type Config

type Config struct {
	Run                 bool  `json:"run"`
	PullInterval        int   `json:"pullInterval"`
	PullByExternalEvent bool  `json:"pullByExternalEvent"`
	PullByTimer         bool  `json:"pullByTimer"`
	Confirmations       int64 `json:"confirmations"`
	Debug               bool  `json:"debug"`
	// contains filtered or unexported fields
}

func (*Config) Load

func (c *Config) Load() (err error)

func (*Config) Save

func (c *Config) Save() (err error)

type PullEvent

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

type Service

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

func NewService

func NewService(options ...ServiceOption) *Service

func (*Service) RegisterBlockEventListen

func (w *Service) RegisterBlockEventListen(handler BlockEvent)

func (*Service) RegisterTransactionEventListen

func (w *Service) RegisterTransactionEventListen(handler TransactionEvent)

func (*Service) Run

func (w *Service) Run() (err error)

type ServiceOption

type ServiceOption func(s *Service)

func SetLastStateTo

func SetLastStateTo(newState int64) ServiceOption

func WithAddressManager

func WithAddressManager(pool *address.Manager) ServiceOption

func WithClient

func WithClient(client types.ChainClient) ServiceOption

func WithConfigStorage

func WithConfigStorage(storage storage.BinStorage) ServiceOption

func WithStateStorage

func WithStateStorage(storage storage.BinStorage) ServiceOption

type TransactionEvent

type TransactionEvent func(transactionInfo *types.TransferInfo)

Jump to

Keyboard shortcuts

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