Checkpoints capture the full state of a running sprite — memory, processes, filesystem — so you can restore it later to the exact same point. Creating and restoring checkpoints are streaming operations:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/superfly/sprites-go/llms.txt
Use this file to discover all available pages before exploring further.
CheckpointStream and RestoreStream deliver progress messages as the operation proceeds. This page also covers network policy management, which controls egress rules for a sprite.
Client methods
CreateCheckpoint
Context for the streaming request.
Name of the sprite to checkpoint.
Stream of
StreamMessage values describing checkpoint progress.Non-nil if the API returns a non-200 status.
CreateCheckpointWithComment
Context for the streaming request.
Name of the sprite to checkpoint.
Descriptive comment. Pass an empty string for no comment.
Stream of progress messages.
Non-nil on API error.
ListCheckpoints
historyFilter to list all checkpoints without filtering.
Request context.
Name of the sprite.
Optional history branch filter. Pass
"" to list all checkpoints.Slice of checkpoints ordered by creation time.
Non-nil on API or parse errors.
ListCheckpointsWithOptions
Request context.
Name of the sprite.
Listing options. See ListCheckpointsOptions.
Matching checkpoints.
Non-nil on API or parse errors.
GetCheckpoint
Request context.
Name of the sprite.
Checkpoint ID returned from
ListCheckpoints or CreateCheckpoint.Checkpoint metadata.
Non-nil if the checkpoint does not exist or the request fails.
RestoreCheckpoint
Context for the streaming request.
Name of the sprite to restore.
ID of the checkpoint to restore from.
Stream of restore progress messages.
Non-nil if the checkpoint is not found or the restore cannot be initiated.
Network policy
GetNetworkPolicy
Request context.
Name of the sprite.
Current policy with its rules list.
Non-nil on network or API errors.
UpdateNetworkPolicy
Request context.
Name of the sprite.
New policy to apply. The existing policy is fully replaced.
Returns
"invalid policy" on a 400 response, or a generic error for other failures.Stream types
CheckpointStream
Next
StreamMessage from the checkpoint stream. Returns io.EOF when the stream is exhausted.
ProcessAll
handler for each. Closes the stream when complete.
Close
RestoreStream
Next
StreamMessage. Returns io.EOF at end of stream.
ProcessAll
Close
Types
Checkpoint
Unique checkpoint identifier.
When the checkpoint was created.
History branch identifiers associated with this checkpoint.
Human-readable label set at creation time.
true if this checkpoint was created automatically by the platform.ListCheckpointsOptions
Filter checkpoints by history branch. Empty string returns all branches.
When
true, includes automatically created checkpoints in the results.StreamMessage
Returned by bothCheckpointStream.Next() and RestoreStream.Next().
Message type:
"info", "stdout", "stderr", or "error".Message payload for non-error events.
Error message when
Type is "error".NetworkPolicy
Ordered list of network rules evaluated top to bottom.
NetworkPolicyRule
Domain or hostname pattern. Omit to create a catch-all rule.
"allow" or "deny".Optional reference to a named policy to include inline.