Documentation ¶
Index ¶
- Constants
- Variables
- type Blob
- type BlockData
- type Commitment
- type Consumer
- func (consumer *Consumer) Close() error
- func (consumer *Consumer) EnableMetrics(registry *prometheus.Registry) error
- func (consumer *Consumer) GetBlockStream() <-chan BlockData
- func (consumer *Consumer) ResetChannel(ctx context.Context, conn *rmq.Connection) bool
- func (consumer *Consumer) Start(ctx context.Context, addr string)
- type ConsumerConfig
- type Consumerer
- type EventListener
- type Namespace
- type PublishPayload
- type QueuesListener
- type SelectiveListener
- type ShareVersion
- type SubmitRequest
- type TransactionId
Constants ¶
View Source
const ( RECONNECT_DELAY = 3 * time.Second RECHANNEL_DELAY = 2 * time.Second EXCHANGE_NAME = "rollup_exchange" )
View Source
const ConsumerSubsystem = "consumer"
View Source
const OperatorNamespace = "sffl_operator"
Variables ¶
View Source
var (
AlreadyClosedError = errors.New("Consumer connection is already closed")
)
View Source
var (
QueueExistsError = errors.New("Queue already exists")
)
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct { Namespace Namespace Commitment Commitment Data []byte }
type BlockData ¶
type BlockData struct { RollupId uint32 Commitment Commitment TransactionId TransactionId Block *types.Block }
type Commitment ¶
type Commitment = [32]byte
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer(config ConsumerConfig, logger logging.Logger) *Consumer
func (*Consumer) EnableMetrics ¶
func (consumer *Consumer) EnableMetrics(registry *prometheus.Registry) error
func (*Consumer) GetBlockStream ¶
func (*Consumer) ResetChannel ¶
type ConsumerConfig ¶
type Consumerer ¶
type EventListener ¶
type EventListener interface { OnArrival() OnFormatError() }
func MakeConsumerMetrics ¶
func MakeConsumerMetrics(registry *prometheus.Registry) (EventListener, error)
type PublishPayload ¶
type PublishPayload struct { TransactionId TransactionId Data []byte }
Type reflection of MQ format
type QueuesListener ¶
type QueuesListener struct {
// contains filtered or unexported fields
}
func NewQueuesListener ¶
func NewQueuesListener(receivedBlocksC chan<- BlockData, eventListener EventListener, logger logging.Logger) *QueuesListener
func (*QueuesListener) Remove ¶
func (l *QueuesListener) Remove(rollupId uint32)
type SelectiveListener ¶
type SelectiveListener struct { OnArrivalCb func() OnFormatErrorCb func() }
func (*SelectiveListener) OnArrival ¶
func (l *SelectiveListener) OnArrival()
func (*SelectiveListener) OnFormatError ¶
func (l *SelectiveListener) OnFormatError()
type SubmitRequest ¶
type SubmitRequest struct {
Blobs []Blob
}
type TransactionId ¶
type TransactionId = [32]byte
Click to show internal directories.
Click to hide internal directories.