Documentation
¶
Overview ¶
Package blob implements the claim-check: a message body larger than the threshold is stored in the blobs object store and the message carries only its name in the Pt-Blob header. It applies uniformly to events, commands and jobs, so every reader resolves bodies the same way.
Index ¶
- Constants
- func DeleteExec(ctx context.Context, in *infra.Infra, execID string) error
- func EraseExec(ctx context.Context, in *infra.Infra, execID string) error
- func Offload(ctx context.Context, in *infra.Infra, execID string, body []byte, ...) ([]byte, error)
- func Resolve(ctx context.Context, in *infra.Infra, body []byte, h nats.Header) ([]byte, error)
Constants ¶
const Header = "Pt-Blob"
Header names the object holding the message body.
Variables ¶
This section is empty.
Functions ¶
func DeleteExec ¶
DeleteExec removes every blob of an execution (archive garbage collection).
func EraseExec ¶ added in v1.0.1
EraseExec removes every blob of an execution that is being deleted, leaving no delete markers behind.
func Offload ¶
func Offload(ctx context.Context, in *infra.Infra, execID string, body []byte, h nats.Header) ([]byte, error)
Offload returns the body to publish: body itself when it fits under the threshold, otherwise an empty body after storing body under "<execID>/<unique>" and setting the header on h.
Types ¶
This section is empty.