services

package
v0.0.0-...-58bdd35 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumable

type Consumable interface {
	ID() string
	ChainID() string
	Body() []byte
	Timestamp() int64
	Nanosecond() int64
}

type Consumer

type Consumer interface {
	Name() string
	Bootstrap(context.Context, *utils.Connections, db.Persist) error
	Consume(context.Context, *utils.Connections, Consumable, db.Persist) error
	ConsumeConsensus(context.Context, *utils.Connections, Consumable, db.Persist) error
	ParseJSON([]byte, *models.BlockProposal) ([]byte, error)
}

Consumer takes in Consumables and adds them to the service's backend

type ConsumerCtx

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

func NewConsumerContext

func NewConsumerContext(ctx context.Context, db dbr.SessionRunner, ts int64, nanosecond int64, persist db.Persist, chainID string) ConsumerCtx

func (*ConsumerCtx) ChainID

func (ic *ConsumerCtx) ChainID() string

func (*ConsumerCtx) Ctx

func (ic *ConsumerCtx) Ctx() context.Context

func (*ConsumerCtx) DB

func (ic *ConsumerCtx) DB() dbr.SessionRunner

func (*ConsumerCtx) Persist

func (ic *ConsumerCtx) Persist() db.Persist

func (*ConsumerCtx) Time

func (ic *ConsumerCtx) Time() time.Time

Directories

Path Synopsis
indexes
avm
cvm
pvm

Jump to

Keyboard shortcuts

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