detach

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package detach deep-copies the durable records that cross a storage or Harness boundary, so the copy shares no mutable memory with what it was read from.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextView

func ContextView(view durable.ContextView) durable.ContextView

ContextView deep-copies a context view.

func Document

func Document(value durable.JsonValue) durable.JsonValue

Document deep-copies a document value or operation. Document objects are ordered, so a Go map a caller placed in one becomes a *delta.JsonObject in JavaScript own-key order: a Go map has no insertion order to keep.

func Entry

func Entry(record durable.EntryRecord) durable.EntryRecord

func JSON

func JSON(value durable.JsonValue) durable.JsonValue

JSON deep-copies a JSON value. JSON containers and scalars take the fast path; any other Go value is copied structurally.

func Messages

func Messages(messages []ai.Message) []ai.Message

func Object

func Object(value durable.JsonObject) durable.JsonObject

func Pointer

func Pointer[T any](value *T) *T

func Value

func Value(value reflect.Value) reflect.Value

Value deep-copies an arbitrary Go value: pointers, slices, maps, interfaces, and the exported fields of structs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL