pubsub

package
v0.0.0-...-2646333 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlerPubSub

type CrawlerPubSub struct {
	GooglePubsub *cpubsub.GooglePubSub
	Topic        string
}

CrawlerPubSub handles logic for crawler pubsub

func NewCrawlerPubSub

func NewCrawlerPubSub(projectID string, topic string) (*CrawlerPubSub, error)

NewCrawlerPubSub creates a new CrawlerPubSub

func (*CrawlerPubSub) BuildMessage

func (c *CrawlerPubSub) BuildMessage(newsroomException bool,
	contractAddress string) (*cpubsub.GooglePubSubMsg, error)

BuildMessage builds a message for the publisher

func (*CrawlerPubSub) BuildMultiSigMessage

func (c *CrawlerPubSub) BuildMultiSigMessage(multiSigException bool,
	contractAddress string) (*cpubsub.GooglePubSubMsg, error)

BuildMultiSigMessage builds a message for the publisher

func (*CrawlerPubSub) PublishMultiSigExceptionMessage

func (c *CrawlerPubSub) PublishMultiSigExceptionMessage(contractAddress string) error

PublishMultiSigExceptionMessage sends a message to pubsub to get all past events for a multiSig

func (*CrawlerPubSub) PublishNewsroomExceptionMessage

func (c *CrawlerPubSub) PublishNewsroomExceptionMessage(contractAddress string) error

PublishNewsroomExceptionMessage sends a message to pubsub to get all past events for a newsroom

func (*CrawlerPubSub) PublishProcessorTriggerMessage

func (c *CrawlerPubSub) PublishProcessorTriggerMessage() error

PublishProcessorTriggerMessage publishes an empty message to process events

func (*CrawlerPubSub) StartPublishers

func (c *CrawlerPubSub) StartPublishers() error

StartPublishers starts the publishers

func (*CrawlerPubSub) StopPublishers

func (c *CrawlerPubSub) StopPublishers() error

StopPublishers stops the publishers

type CrawlerPubSubMessage

type CrawlerPubSubMessage struct {
	NewsroomException bool   `json:"newsroomException"`
	MultiSigException bool   `json:"multiSigException"`
	ContractAddress   string `json:"contractAddress"`
}

CrawlerPubSubMessage is the message sent from the crawler

Jump to

Keyboard shortcuts

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