Documentation
¶
Overview ¶
Package sinkbinding defines the pipeline sink execution marker and reserved parameter names injected by the sink runtime.
Input is the only user-facing binding name that saved sink operations should reference. The __braidplane_* names are internal runtime metadata used to preserve backend-native behavior behind that single public binding and are rejected from user-supplied sink config.
Index ¶
- Constants
- func IsSinkExecution(ctx context.Context) bool
- func ReservedNames() []string
- func ValidRecordField(name string) bool
- func ValidRecordUpdateOperation(operation map[string]any) bool
- func WithHTTPRecordUpdate(ctx context.Context, recordID string, properties map[string]string, ...) context.Context
- func WithSinkExecution(ctx context.Context) context.Context
- type HTTPRecordUpdate
- type RecordReadback
Constants ¶
const ( // Input is the public reserved sink payload binding exposed to saved sink operations. Input = "input" // InternalInputRows carries runtime row payloads for SQL connectors that can // materialize a native input relation. InternalInputRows = "__braidplane_input_rows" // InternalInputColumns carries the ordered column list paired with // InternalInputRows. InternalInputColumns = "__braidplane_input_columns" // InternalInputRepresentation carries the runtime payload representation for // connectors that need representation-sensitive handling behind the single // public Input binding. InternalInputRepresentation = "__braidplane_input_representation" // InternalInputFileMetadata carries safe metadata for native file payloads. InternalInputFileMetadata = "__braidplane_input_file" // InternalInputFileFilename carries the file payload filename for template substitution. InternalInputFileFilename = "__braidplane_input_file.filename" // InternalInputFileMIMEType carries the file payload media type for template substitution. InternalInputFileMIMEType = "__braidplane_input_file.mime_type" // InternalInputFileSizeBytes carries the file payload size for template substitution. InternalInputFileSizeBytes = "__braidplane_input_file.size_bytes" // InternalInputFileDigestAlgorithm carries the file payload digest algorithm. InternalInputFileDigestAlgorithm = "__braidplane_input_file.digest_algorithm" // InternalInputFileDigest carries the file payload digest value for template substitution. InternalInputFileDigest = "__braidplane_input_file.digest" // InternalIdempotencyKey carries the stable runtime sink idempotency key. InternalIdempotencyKey = "__braidplane_sink_idempotency_key" // InternalIdempotencyClass carries the declared sink idempotency class. InternalIdempotencyClass = "__braidplane_sink_idempotency_class" // InternalEffectStartedAt retains the original durable claim time across recovery. InternalEffectStartedAt = "__braidplane_sink_effect_started_at" // InternalReplayIdentity carries the original effect namespace for operator // replays that must target the same deterministic external object. InternalReplayIdentity = "__braidplane_sink_replay_identity" )
const RecordIDParam = "runtime.sink.record_id"
Variables ¶
This section is empty.
Functions ¶
func IsSinkExecution ¶
IsSinkExecution reports whether the operation was marked as a sink execution.
func ReservedNames ¶
func ReservedNames() []string
ReservedNames lists the parameter names owned by the sink runtime.
func ValidRecordField ¶
ValidRecordField reports whether a name identifies a single literal field.
func ValidRecordUpdateOperation ¶
ValidRecordUpdateOperation restricts dispatch to one bound path segment and an explicitly projected JSON body.
Types ¶
type HTTPRecordUpdate ¶
type HTTPRecordUpdate struct {
RecordID string `json:"record_id"`
Properties map[string]string `json:"properties"`
Reconcile bool `json:"reconcile,omitempty"`
Readback RecordReadback `json:"readback"`
}
HTTPRecordUpdate carries the bounded sink's desired state across the encrypted executor boundary.
func HTTPRecordUpdateFrom ¶
func HTTPRecordUpdateFrom(ctx context.Context) *HTTPRecordUpdate
HTTPRecordUpdateFrom returns nil for ordinary single-request sinks.
type RecordReadback ¶
type RecordReadback struct {
IdentityField string `json:"identity_field"`
FieldsObject string `json:"fields_object,omitempty"`
SelectParameter string `json:"select_parameter,omitempty"`
}
RecordReadback describes a JSON response containing the record identity and mapped field values.
func (RecordReadback) Valid ¶
func (r RecordReadback) Valid() bool
Valid reports whether a response can carry the configured identity and fields.