Documentation ¶
Index ¶
- func NewAdapterComponent(cfg smadapter.Config, ps crypto.PlatformScheme, storageFactory StorageFactory, ...) managed.Component
- type AppendFuture
- type BasicPlashConfig
- type Future
- type PlashAssistant
- type ReadAdapter
- type ReadService
- type Service
- type StorageFactory
- type WriteAdapter
- func (v WriteAdapter) PrepareAsync(ctx smachine.ExecutionContext, callFn func(Service) smachine.AsyncResultFunc) smachine.AsyncCallRequester
- func (v WriteAdapter) PrepareNotify(ctx smachine.ExecutionContext, callFn func(Service)) smachine.NotifyRequester
- func (v WriteAdapter) SendNotify(ctx smachine.LimitedExecutionContext, callFn func(Service))
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 (*Future) GetFutureAllocation ¶
func (p *Future) GetFutureAllocation() (isReady bool, allocations []ledger.DirectoryIndex)
func (*Future) GetFutureResult ¶
func (*Future) GetReadySync ¶
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) PrepareAsync ¶
func (v ReadAdapter) PrepareAsync(ctx smachine.ExecutionContext, callFn func(ReadService) smachine.AsyncResultFunc) smachine.AsyncCallRequester
func (ReadAdapter) PrepareNotify ¶
func (v ReadAdapter) PrepareNotify(ctx smachine.ExecutionContext, callFn func(ReadService)) smachine.NotifyRequester
type ReadService ¶
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 (v WriteAdapter) PrepareAsync(ctx smachine.ExecutionContext, callFn func(Service) smachine.AsyncResultFunc) smachine.AsyncCallRequester
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))
Source Files ¶
Click to show internal directories.
Click to hide internal directories.