chain_events

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChainEvent chainEvent // singleton of type event

Functions

This section is empty.

Types

type GetEventTypes

type GetEventTypes func() ([]string, error)

type GormStore

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

func (*GormStore) LockedStatus added in v0.6.1

func (s *GormStore) LockedStatus(fn func(status *ListenerStatus) error) error

LockedStatus runs a transaction on the database manipulating 'status' of type ListenerStatus.

type Listener

type Listener interface {
	Start() Listener
	Stop()
}

func NewListener

func NewListener(
	fc flow_helpers.FlowClient,
	db Store,
	getTypes GetEventTypes,
	maxDiff uint64,
	interval time.Duration,
	startingHeight uint64,
	opts ...ListenerOption,
) Listener

type ListenerImpl added in v0.10.0

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

func (*ListenerImpl) Start added in v0.10.0

func (l *ListenerImpl) Start() Listener

func (*ListenerImpl) Stop added in v0.10.0

func (l *ListenerImpl) Stop()

type ListenerOption added in v0.9.0

type ListenerOption func(*ListenerImpl)

func WithSystemService added in v0.9.0

func WithSystemService(svc system.Service) ListenerOption

type ListenerStatus

type ListenerStatus struct {
	gorm.Model
	LatestHeight uint64
}

func (ListenerStatus) TableName

func (ListenerStatus) TableName() string

type LockError added in v0.6.1

type LockError struct {
	Err error
}

func (*LockError) Error added in v0.6.1

func (e *LockError) Error() string

type Store

type Store interface {
	LockedStatus(func(*ListenerStatus) error) error
}

Store manages data regarding tokens.

func NewGormStore

func NewGormStore(db *gorm.DB) Store

Jump to

Keyboard shortcuts

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