event

package
v0.0.0-...-2d88f35 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DuplicateVaa

type DuplicateVaa struct {
	VaaID            string     `json:"vaaId"`
	ChainID          uint16     `json:"chainId"`
	Version          uint8      `json:"version"`
	GuardianSetIndex uint32     `json:"guardianSetIndex"`
	Vaa              []byte     `json:"vaas"`
	Digest           string     `json:"digest"`
	ConsistencyLevel uint8      `json:"consistencyLevel"`
	Timestamp        *time.Time `json:"timestamp"`
}

type EventDispatcher

type EventDispatcher interface {
	NewAttestationVaa(ctx context.Context, vaa Vaa) error
	NewDuplicateVaa(ctx context.Context, e DuplicateVaa) error
	NewGovernorStatus(ctx context.Context, e GovernorStatus) error
	NewGovernorConfig(ctx context.Context, e GovernorConfig) error
}

type GovernorConfig

type GovernorConfig struct {
	NodeAddress string `json:"nodeAddress"`
	NodeName    string `json:"nodeName"`
	Counter     int64  `json:"counter"`
	Timestamp   int64  `json:"timestamp"`
	Chains      any    `json:"chains"`
}

type GovernorStatus

type GovernorStatus struct {
	NodeAddress string `json:"nodeAddress"`
	NodeName    string `json:"nodeName"`
	Counter     int64  `json:"counter"`
	Timestamp   int64  `json:"timestamp"`
	Chains      any    `json:"chains"`
}

type NoopEventDispatcher

type NoopEventDispatcher struct{}

func NewNoopEventDispatcher

func NewNoopEventDispatcher() *NoopEventDispatcher

func (*NoopEventDispatcher) NewAttestationVaa

func (n *NoopEventDispatcher) NewAttestationVaa(context.Context, Vaa) error

func (*NoopEventDispatcher) NewDuplicateVaa

func (n *NoopEventDispatcher) NewDuplicateVaa(context.Context, DuplicateVaa) error

func (*NoopEventDispatcher) NewGovernorConfig

func (n *NoopEventDispatcher) NewGovernorConfig(ctx context.Context, e GovernorConfig) error

func (*NoopEventDispatcher) NewGovernorStatus

func (n *NoopEventDispatcher) NewGovernorStatus(context.Context, GovernorStatus) error

type SnsEventDispatcher

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

func NewSnsEventDispatcher

func NewSnsEventDispatcher(awsConfig aws.Config, processorUrl string, pipelineUrl string) (*SnsEventDispatcher, error)

func (*SnsEventDispatcher) NewAttestationVaa

func (s *SnsEventDispatcher) NewAttestationVaa(ctx context.Context, vaa Vaa) error

func (*SnsEventDispatcher) NewDuplicateVaa

func (s *SnsEventDispatcher) NewDuplicateVaa(ctx context.Context, e DuplicateVaa) error

func (*SnsEventDispatcher) NewGovernorConfig

func (s *SnsEventDispatcher) NewGovernorConfig(ctx context.Context, e GovernorConfig) error

func (*SnsEventDispatcher) NewGovernorStatus

func (s *SnsEventDispatcher) NewGovernorStatus(ctx context.Context, e GovernorStatus) error

type Vaa

type Vaa struct {
	ID               string    `json:"id"`
	VaaID            string    `json:"vaaId"`
	EmitterChainID   uint16    `json:"emitterChainId"`
	EmitterAddress   string    `json:"emitterAddress"`
	Sequence         uint64    `json:"sequence"`
	Version          uint8     `json:"version"`
	GuardianSetIndex uint32    `json:"guardianSetIndex"`
	Raw              []byte    `json:"raw"`
	Timestamp        time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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