stateful_bun

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InternalStateProtoFormat = format.Protobuf[*protobuf.State]()
View Source
var ResultsStateProtoFormat = format.Protobuf[*protobuf.Results]()

Functions

func NewSingleStateRepository

func NewSingleStateRepository(configurations ...runtime.Configuration[SingleStateRepository]) stateful.SingleStateRepository

constructor

func TableToState

func TableToState(dbState *SingleStateTable) (stateful.SingleState[message.Bytes], error)

func WithSingleStateRepositoryConnection

func WithSingleStateRepositoryConnection(connection runtime_bun.BunConnection) runtime.Configuration[SingleStateRepository]

configuration

func WithSingleStateRepositoryPersistenceTableName

func WithSingleStateRepositoryPersistenceTableName(persistenceTableName string) runtime.Configuration[SingleStateRepository]

Types

type SingleStateRepository

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

implementation

func (SingleStateRepository) Get

func (SingleStateRepository) Upsert

type SingleStateTable

type SingleStateTable struct {
	PersistenceId      string `bun:",pk"`
	Internal           []byte
	Results            []byte
	Content            []byte
	CreatedTimestampMs int64
	UpdatedTimestampMs int64
}

func StateToTable

func StateToTable(nextState stateful.SingleState[message.Bytes]) (*SingleStateTable, error)

Jump to

Keyboard shortcuts

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