topic

package
v0.0.0-...-ae94c13 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID               string     `json:"id"`
	ChainID          uint16     `json:"emitterChain"`
	EmitterAddress   string     `json:"emitterAddr"`
	Sequence         string     `json:"sequence"`
	GuardianSetIndex uint32     `json:"guardianSetIndex"`
	Vaa              []byte     `json:"vaas"`
	IndexedAt        time.Time  `json:"indexedAt"`
	Timestamp        *time.Time `json:"timestamp"`
	UpdatedAt        *time.Time `json:"updatedAt"`
	TxHash           string     `json:"txHash"`
	Version          uint16     `json:"version"`
	Revision         uint16     `json:"revision"`
	Digest           string     `json:"digest"`
	Overwrite        bool       `json:"overwrite"`
}

Event represents a vaa data to be handle by the pipeline.

type PushFunc

type PushFunc func(context.Context, *Event) error

PushFunc is a function to push VAAEvent.

type SNS

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

SQS represents a VAA queue in SNS.

func NewVAASNS

func NewVAASNS(producer *sns.Producer, alertClient alert.AlertClient, metrics metrics.Metrics, logger *zap.Logger) *SNS

NewVAASNS creates a VAA topic in SNS instances.

func (*SNS) Publish

func (s *SNS) Publish(ctx context.Context, message *Event) error

Publish sends the message to a SNS topic.

type VAAInMemory

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

VAAInMemory represents VAA queue in memory.

func NewVAAInMemory

func NewVAAInMemory(logger *zap.Logger) *VAAInMemory

NewVAAInMemory creates a VAA queue in memory instances.

func (*VAAInMemory) Publish

func (i *VAAInMemory) Publish(_ context.Context, message *Event) error

Publish sends the message to a channel.

type VAAInMemoryOption

type VAAInMemoryOption func(*VAAInMemory)

VAAInMemoryOption represents a VAA queue in memory option function.

Jump to

Keyboard shortcuts

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