buildersvc

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapterComponent

func NewAdapterComponent(cfg smadapter.Config, ps crypto.PlatformScheme, storageFactory StorageFactory, plashLimit int) managed.Component

Types

type AppendFuture

type AppendFuture interface {
	TrySetFutureResult(allocations []ledger.DirectoryIndex, err error) bool
}

type BasicPlashConfig

type BasicPlashConfig struct {
	PulseRange pulse.Range
	Population census.OnlinePopulation
	CallbackFn func(error)
}

type Future

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

func NewFuture

func NewFuture(name string) *Future

func (*Future) GetFutureAllocation

func (p *Future) GetFutureAllocation() (isReady bool, allocations []ledger.DirectoryIndex)

func (*Future) GetFutureResult

func (p *Future) GetFutureResult() (isReady bool, err error)

func (*Future) GetReadySync

func (p *Future) GetReadySync() smachine.SyncLink

func (*Future) TrySetFutureResult

func (p *Future) TrySetFutureResult(allocations []ledger.DirectoryIndex, err error) bool

type PlashAssistant

type PlashAssistant interface {
	CalculateJetDrop(reference.Holder) jet.DropID
	IsGenesis() bool

	// GetNextReadySync returns a sync object that will be opened after next Plash is started.
	GetNextReadySync() smachine.SyncLink
	// CalculateNextDrops must NOT be accessed before GetNextReadySync() is triggered.
	CalculateNextDrops(jet.DropID) []jet.DropID
}

type ReadAdapter

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

func NewReadAdapter

func NewReadAdapter(adapterID smachine.AdapterID, executor smachine.AdapterExecutor, service ReadService) ReadAdapter

func (ReadAdapter) PrepareNotify

func (v ReadAdapter) PrepareNotify(ctx smachine.ExecutionContext, callFn func(ReadService)) smachine.NotifyRequester

type ReadService

type ReadService interface {
	DropReadDirty(jet.DropID, func(reader bundle.DirtyReader) error) error
}

type Service

type Service interface {
	CreatePlash(cfg BasicPlashConfig, treePrev, treeCur jet.Tree) (PlashAssistant, conveyor.PulseChanger, []jet.ExactID)
	CreateGenesis(BasicPlashConfig) (PlashAssistant, conveyor.PulseChanger, jet.ExactID)
	AppendToDrop(jet.DropID, AppendFuture, lineage.UpdateBundle)
	AppendToDropSummary(jet.DropID, lineage.LineSummary)
	FinalizeDropSummary(jet.DropID) catalog.DropReport
}

type StorageFactory

type StorageFactory interface {
	CreateSnapshotWriter(pn pulse.Number, maxSection ledger.SectionID) bundle.SnapshotWriter
	DepositReadOnlyWriter(bundle.SnapshotWriter) error
}

type WriteAdapter

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

func NewWriteAdapter

func NewWriteAdapter(adapterID smachine.AdapterID, executor smachine.AdapterExecutor, service Service) WriteAdapter

func (WriteAdapter) PrepareAsync

func (WriteAdapter) PrepareNotify

func (v WriteAdapter) PrepareNotify(ctx smachine.ExecutionContext, callFn func(Service)) smachine.NotifyRequester

func (WriteAdapter) SendNotify

func (v WriteAdapter) SendNotify(ctx smachine.LimitedExecutionContext, callFn func(Service))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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