listener

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

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

func NewListener

func NewListener(cfg ListenerConfig, clients map[string]clients.Client, processors []processorCommon.Processor, db *store.Store, log logger.Logger, whm webhook.WebHookManager) (*Listener, error)

NewListener creates a new listener.

func (*Listener) Start

func (l *Listener) Start(ctx context.Context)

type ListenerConfig

type ListenerConfig struct {
	// StartBlock specifies the block at which we start listening for event.
	// switch StartBlock:
	// 		case -1:
	//			LoadFromDB();
	//		case 0:
	//			StartFromLatest()
	//		default:
	//			StartRightWhereItIsDefined()
	StartBlock int64 `json:"StartBlock"`
}

func DefaultConfig

func DefaultConfig() ListenerConfig

func (ListenerConfig) IsValid

func (cfg ListenerConfig) IsValid() (bool, error)

Jump to

Keyboard shortcuts

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