receiver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Status   Status
	Protocol string
	Body     interface{}
}

Message -

type Receiver

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

Receiver -

func New

func New(urls []string, network string, opts ...ReceiverOption) (*Receiver, error)

New -

func (*Receiver) Close

func (indexer *Receiver) Close() error

Close -

func (*Receiver) Operations

func (indexer *Receiver) Operations() <-chan Message

Operations -

func (*Receiver) Start

func (indexer *Receiver) Start()

Start -

type ReceiverOption

type ReceiverOption func(*Receiver)

ReceiverOption -

func WithInterval

func WithInterval(seconds uint64) ReceiverOption

WithInterval -

func WithStorage

func WithStorage(db *gorm.DB, blockTime int64) ReceiverOption

WithStorage -

func WithTimeout

func WithTimeout(seconds uint64) ReceiverOption

WithTimeout -

type Status

type Status string

Status

const (
	StatusApplied       Status = "applied"
	StatusBranchDelayed Status = "branch_delayed"
	StatusBranchRefused Status = "branch_refused"
	StatusRefused       Status = "refused"
	StatusUnprocessed   Status = "unprocessed"
)

Statuses

Jump to

Keyboard shortcuts

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