ports

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ports holds runtime inputs that have no transport or persistence policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Seq    int64
	TaskID string
	Value  domain.CommitBatch
}

type Clock

type Clock func() time.Time

type Hook

type Hook func(HookEvent) error

type HookEvent

type HookEvent struct{ Point, Method, Key string }

type Receipt

type Receipt struct {
	Principal, Key, Hash, TaskID, AgentID string
	Payload                               []byte
	Encrypted                             bool
}

type Store

type Store interface {
	Begin(context.Context, bool) (Transaction, error)
	Close() error
}

type Transaction

type Transaction interface {
	Commit() error
	Rollback()
	Meta(string) (string, error)
	SetMeta(string, string) error
	Audit(string, string) error
	Task(string) (*domain.Task, error)
	Tasks() ([]domain.Task, error)
	PutTask(domain.Task, int64) error
	Record(string, string) (*domain.Record, error)
	Records(string) ([]domain.Record, error)
	PutRecord(domain.Record) error
	TokenHash(string) (string, error)
	PutTokenHash(string, string) error
	Receipt(string, string) (*Receipt, error)
	PutReceipt(Receipt) error
	AppendBatch(domain.CommitBatch, string) error
	Watermark() (int64, error)
	Batches(int64, int) ([]Batch, error)
}

Jump to

Keyboard shortcuts

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