server

package
v1.1.7-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueue added in v1.1.2

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

MessageQueue takes care of message routing and encoding

func NewMessageQueue added in v1.1.2

func NewMessageQueue(writer driver.Writer, encoder message.Encoder) MessageQueue

func (MessageQueue) Close added in v1.1.2

func (mq MessageQueue) Close() error

func (MessageQueue) Flush added in v1.1.2

func (mq MessageQueue) Flush() error

func (MessageQueue) PostAction added in v1.1.2

func (mq MessageQueue) PostAction(act message.ActionTrace) error

Post a ActionTrace message to the queue

func (MessageQueue) PostHeartbeat added in v1.1.2

func (mq MessageQueue) PostHeartbeat(hb message.HeartBeat) error

func (MessageQueue) PostRollback added in v1.1.2

func (mq MessageQueue) PostRollback(rb message.RollbackMessage) error

func (MessageQueue) PostTableDelta added in v1.1.2

func (mq MessageQueue) PostTableDelta(delta message.TableDelta) error

func (MessageQueue) PostTransactionTrace added in v1.1.2

func (mq MessageQueue) PostTransactionTrace(trace message.TransactionTrace) error

type ShipProcessor

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

A ShipProcessor will consume messages from a ship stream, convert the messages into thalos specific ones, encode them and finally post them to an api.Writer

func SpawnProccessor

func SpawnProccessor(shipStream *shipclient.Stream, loader StateLoader, saver StateSaver, writer driver.Writer, abi *abi.AbiManager, codec message.Codec) *ShipProcessor

SpawnProcessor creates a new ShipProccessor that consumes the shipclient.Stream passed to it.

func (*ShipProcessor) Close

func (processor *ShipProcessor) Close() error

Close closes the writer associated with the processor.

func (*ShipProcessor) FetchDeltas added in v1.1.7

func (processor *ShipProcessor) FetchDeltas(value bool)

func (*ShipProcessor) GetCurrentBlock

func (processor *ShipProcessor) GetCurrentBlock() uint32

Get the current block.

func (*ShipProcessor) SetBlacklist added in v1.1.2

func (processor *ShipProcessor) SetBlacklist(list types.Blacklist)

type State

type State struct {
	// Last processed block
	CurrentBlock uint32
}

State represents thalos runtime state

type StateLoader

type StateLoader func(*State)

StateLoader is a function that loads a state.

type StateSaver

type StateSaver func(State) error

StateSaver is a function that saves a state.

Jump to

Keyboard shortcuts

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