outboundprocessor

package
v0.0.0-...-cda3398 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package outboundprocessor provides functionalities to track outbound processing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToOutboundID

func ToOutboundID(index string, receiverChainID int64, nonce uint64) string

ToOutboundID returns the outbound ID for OutboundProcessor to track

Types

type Processor

type Processor struct {
	Logger zerolog.Logger
	// contains filtered or unexported fields
}

Processor is a struct that contains data about outbound being processed TODO(revamp): rename this struct as it is not used to process outbound but track their processing We can also consider removing it once we refactor chain client to contains common logic to sign outbounds

func NewProcessor

func NewProcessor(logger zerolog.Logger) *Processor

NewProcessor creates a new Processor

func (*Processor) EndTryProcess

func (p *Processor) EndTryProcess(outboundID string)

EndTryProcess remove the outbound ID from tracking

func (*Processor) IsOutboundActive

func (p *Processor) IsOutboundActive(outboundID string) bool

IsOutboundActive checks if the outbound ID is being processed

func (*Processor) StartTryProcess

func (p *Processor) StartTryProcess(outboundID string)

StartTryProcess register a new outbound ID to track

func (*Processor) TimeInTryProcess

func (p *Processor) TimeInTryProcess(outboundID string) time.Duration

TimeInTryProcess returns the time elapsed since the outbound ID is being processed

Jump to

Keyboard shortcuts

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