Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheReadOption ¶ added in v0.14.0
type CacheReadOption int
Messages have fields that are mutable, in two categories
1) Can change multiple times like state - you cannot rely on the cache for these 2) Can go from being un-set, to being set, and once set are immutable. For (2) the cache provides a set of CacheReadOption modifiers that makes it safe to query the cache, even if the cache we slow to update asynchronously (active/active cluster being the ultimate example here, but from code inspection this is possible in the current cache).
const ( // If you use CRORequirePublicBlobRefs then the cache will return a miss, if all data blobs do not have a `public` reference string CRORequirePublicBlobRefs CacheReadOption = iota // If you use CRORequirePins then the cache will return a miss, if the number of pins does not match the number of topics in the message. CRORequirePins // If you use CRORequestBatchID then the cache will return a miss, if there is no BatchID set. CRORequireBatchID )
type Manager ¶
type Manager interface {
CheckDatatype(ctx context.Context, ns string, datatype *fftypes.Datatype) error
ValidateAll(ctx context.Context, data fftypes.DataArray) (valid bool, err error)
GetMessageWithDataCached(ctx context.Context, msgID *fftypes.UUID, options ...CacheReadOption) (msg *fftypes.Message, data fftypes.DataArray, foundAllData bool, err error)
GetMessageDataCached(ctx context.Context, msg *fftypes.Message, options ...CacheReadOption) (data fftypes.DataArray, foundAll bool, err error)
PeekMessageCache(ctx context.Context, id *fftypes.UUID, options ...CacheReadOption) (msg *fftypes.Message, data fftypes.DataArray)
UpdateMessageCache(msg *fftypes.Message, data fftypes.DataArray)
UpdateMessageIfCached(ctx context.Context, msg *fftypes.Message)
ResolveInlineData(ctx context.Context, msg *NewMessage) error
WriteNewMessage(ctx context.Context, newMsg *NewMessage) error
VerifyNamespaceExists(ctx context.Context, ns string) error
UploadJSON(ctx context.Context, ns string, inData *fftypes.DataRefOrValue) (*fftypes.Data, error)
UploadBLOB(ctx context.Context, ns string, inData *fftypes.DataRefOrValue, blob *fftypes.Multipart, autoMeta bool) (*fftypes.Data, error)
DownloadBLOB(ctx context.Context, ns, dataID string) (*fftypes.Blob, io.ReadCloser, error)
HydrateBatch(ctx context.Context, persistedBatch *fftypes.BatchPersisted) (*fftypes.Batch, error)
WaitStop()
}
func NewDataManager ¶
func NewDataManager(ctx context.Context, di database.Plugin, pi sharedstorage.Plugin, dx dataexchange.Plugin) (Manager, error)
type NewMessage ¶ added in v0.14.0
Click to show internal directories.
Click to hide internal directories.