chainevents

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BROADCAST_TO_USERS = "0x00"
	TARGET_USERS       = "users"
	TARGET_OWNER       = "owner"
	APP_SEQ_NO         = "seqNo"
	TOKEN_EVT_APPROVAL = "Approval"
)

Variables

This section is empty.

Functions

func ExecuteEvents

func ExecuteEvents(dataChannel chan events.Event, externalEventRepo *EventRepository)

func ListenEvent

func ListenEvent(conn *ethclient.Client, contracts []ContractInfo, fromBlock uint64, interval time.Duration,
	dataChannel chan events.Event, errorChannel chan error) bool

func SetFromBlock

func SetFromBlock(from uint64)

func StartEventProcessing

func StartEventProcessing(
	conn *ethclient.Client,
	contracts []ContractInfo,
)

func SubscribeExternal

func SubscribeExternal(
	clientAddr common.Address,
	eventName string,
	eventCallback EventCallback,
) error

func UnSubscribeExternal

func UnSubscribeExternal(
	clientAddr common.Address,
	eventName string,
) error

Types

type ContractInfo

type ContractInfo struct {
	Address string
	Abi     string
	Events  []string
}

type EventCallback

type EventCallback func(event events.Event) bool

type EventRepository

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

func NewEventRepository

func NewEventRepository() *EventRepository

Jump to

Keyboard shortcuts

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