Function prepareRecorderKitMakers prepare Recorder Kit Makers ( baggage , marshaller ) : { makeDurablePublishKit : ( < T > ( options ?: { valueDurability : undefined | "mandatory" ; } ) => PublishKit < T > ) ; makeERecorderKit : ( < T > ( storageNodeP : ERef < StorageNode > , valueShape ?: TypedPattern < T > ) => EventualRecorderKit < T > ) ; makeRecorder : ( ( ... args : [ publisher: Publisher < unknown > , storageNode: DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape: TypedPattern < any > ] ) => Guarded < { getStorageNode ( ) : DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > ; getStoragePath ( ) : Promise < string > ; write ( value : any ) : Promise < void > ; writeFinal ( value : any ) : Promise < void > ; } > ) ; makeRecorderKit : ( < T > ( storageNode : StorageNode | DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape ?: TypedPattern < T > ) => RecorderKit < T > ) ; } Parameters baggage : Baggage marshaller : ERef < { fromCapData : FromCapData < unknown > ; serialize : ToCapData < unknown > ; toCapData : ToCapData < unknown > ; unserialize : FromCapData < unknown > ; } > Returns { makeDurablePublishKit : ( < T > ( options ?: { valueDurability : undefined | "mandatory" ; } ) => PublishKit < T > ) ; makeERecorderKit : ( < T > ( storageNodeP : ERef < StorageNode > , valueShape ?: TypedPattern < T > ) => EventualRecorderKit < T > ) ; makeRecorder : ( ( ... args : [ publisher: Publisher < unknown > , storageNode: DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape: TypedPattern < any > ] ) => Guarded < { getStorageNode ( ) : DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > ; getStoragePath ( ) : Promise < string > ; write ( value : any ) : Promise < void > ; writeFinal ( value : any ) : Promise < void > ; } > ) ; makeRecorderKit : ( < T > ( storageNode : StorageNode | DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape ?: TypedPattern < T > ) => RecorderKit < T > ) ; } make Durable Publish Kit : ( < T > ( options ?: { valueDurability : undefined | "mandatory" ; } ) => PublishKit < T > ) < T > ( options ? ) : PublishKit < T > Parameters Optional
options : { valueDurability : undefined | "mandatory" ; } value Durability : undefined | "mandatory" makeERecorder Kit : ( < T > ( storageNodeP : ERef < StorageNode > , valueShape ?: TypedPattern < T > ) => EventualRecorderKit < T > ) < T > ( storageNodeP , valueShape ? ) : EventualRecorderKit < T > Parameters storageNodeP : ERef < StorageNode > Optional
valueShape : TypedPattern < T > make Recorder : ( ( ... args : [ publisher: Publisher < unknown > , storageNode: DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape: TypedPattern < any > ] ) => Guarded < { getStorageNode ( ) : DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > ; getStoragePath ( ) : Promise < string > ; write ( value : any ) : Promise < void > ; writeFinal ( value : any ) : Promise < void > ; } > ) ( ... args ) : Guarded < { getStorageNode ( ) : DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > ; getStoragePath ( ) : Promise < string > ; write ( value : any ) : Promise < void > ; writeFinal ( value : any ) : Promise < void > ; } > Parameters Rest
... args : [ publisher: Publisher < unknown > , storageNode: DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape: TypedPattern < any > ] Returns Guarded < { getStorageNode ( ) : DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > ; getStoragePath ( ) : Promise < string > ; write ( value : any ) : Promise < void > ; writeFinal ( value : any ) : Promise < void > ; } > make Recorder Kit : ( < T > ( storageNode : StorageNode | DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > , valueShape ?: TypedPattern < T > ) => RecorderKit < T > ) < T > ( storageNode , valueShape ? ) : RecorderKit < T > Parameters storageNode : StorageNode | DataOnly < StorageNode > & RemotableBrand < DataOnly < StorageNode > , StorageNode > Optional
valueShape : TypedPattern < T >
Convenience wrapper for DurablePublishKit and Recorder kinds.
NB: this defines two durable kinds. Must be called at most once per baggage.
makeRecorderKit
is suitable for making a durableRecorderKit
which can be held in Exo state.makeERecorderKit
is for closures that must return asubscriber
synchronously but can defer therecorder
.