TheDocumentation 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.
Sprite type represents a single sprite instance. You obtain a *Sprite either by calling client.Sprite(name) for a lightweight handle to an existing sprite, or through CreateSprite, GetSprite, and the list methods which return sprites with fields populated from the API. Once you have a *Sprite you can run commands, manage services, checkpoint state, proxy ports, and more.
Fields
These fields are populated when a*Sprite is returned by GetSprite, ListAllSprites, or similar methods that fetch from the API.
Unique identifier assigned by the server.
Name of the organization that owns this sprite.
Current lifecycle status (e.g.,
"running", "warm", "cold", "created").Resource configuration for the sprite.
Environment variables set on the sprite.
When the sprite was created.
When the sprite was last updated.
Name of the storage bucket associated with this sprite.
Primary deployment region.
Public URL for the sprite, if configured.
URL authentication settings.
Labels attached to the sprite.
When the sprite was last running. Nil if never run.
When the sprite last entered a warming state. Nil if never warmed.
Accessors
Name
The sprite name.
Client
*Client associated with this sprite.
The client that owns this sprite handle.
Organization
nil if none was set.
Organization context, or
nil.Lifecycle
Destroy
context.Background(). Convenience wrapper around Delete.
Non-nil on failure.
Delete
Context for the HTTP request.
Non-nil on failure.
Upgrade
Context for the HTTP request.
Non-nil on failure.
UpdateURLSettings
Context for the HTTP request.
New URL settings to apply.
Non-nil on failure.
Commands
Command
*Cmd to execute the named program with the given arguments on the sprite. The returned Cmd is not started until Run, Start, or Output is called. Uses context.Background().
Path or name of the program to execute (e.g.,
"python", "/usr/bin/env").Arguments to pass to the program.
Command ready to be configured and started.
CommandContext
Command, but associates a context. If the context is cancelled before the command completes, the process is killed. Panics if ctx is nil.
Context used to cancel or time out the command. Must not be nil.
Path or name of the program to execute.
Arguments to pass to the program.
Command ready to be configured and started.
Filesystem
Filesystem
FS rooted at / that provides both read and write operations on the sprite’s filesystem.
Filesystem interface implementing
io/fs.FS, fs.StatFS, fs.ReadFileFS, fs.ReadDirFS, and write operations (WriteFile, Mkdir, MkdirAll, Remove, RemoveAll, Rename, Copy, Chmod).FilesystemAt
FS rooted at the given directory.
Absolute path to use as the working directory root.
Filesystem interface scoped to the given directory.
Proxy
ProxyPort
localPort on localhost to remotePort on the sprite. Returns a *ProxySession that must be closed when no longer needed.
Context for the proxy session lifecycle.
Port to listen on locally.
Port to proxy to on the sprite.
Active proxy session.
Non-nil on failure.
ProxyPorts
Context for the proxy sessions.
List of port mappings to proxy.
Active proxy sessions, one per mapping.
Non-nil on failure.
ProxySocket
net.Conn to the given address on the sprite. Only "tcp" is supported for network.
Context for the connection.
Network type. Only
"tcp" is supported.Address in
"host:port" format to connect to on the sprite.Connected network connection.
Non-nil on failure.
Sessions
ListSessions
Context for the HTTP request.
Active sessions.
Non-nil on failure.
AttachSession
*Cmd that, when started, attaches to an existing session by ID. Uses context.Background().
ID of the session to attach to.
Command ready to attach to the session.
AttachSessionContext
AttachSession, but with a context.
Context for the attach operation.
ID of the session to attach to.
Command ready to attach to the session.
Services
ListServices
Context for the HTTP request.
Services with their current state.
Non-nil on failure.
GetService
Context for the HTTP request.
Name of the service to retrieve.
Service definition and state.
Non-nil on failure.
CreateService
Context for the HTTP request.
Name to assign to the service.
Service definition.
Streaming log events. Call
Next() to read events, Close() when done.Non-nil on failure.
StartService
Context for the HTTP request.
Name of the service to start.
Streaming log events.
Non-nil on failure.
StopService
Context for the HTTP request.
Name of the service to stop.
Streaming log events.
Non-nil on failure.
DeleteService
Context for the HTTP request.
Name of the service to delete.
Non-nil on failure.
SignalService
Context for the HTTP request.
Name of the target service.
Signal name (e.g.,
"HUP", "TERM", "KILL").Non-nil on failure.
Checkpoints
CreateCheckpoint
Context for the HTTP request.
Streaming progress messages. Call
Next() to read *StreamMessage values, Close() when done.Non-nil on failure.
CreateCheckpointWithComment
Context for the HTTP request.
Human-readable comment for the checkpoint. Pass an empty string for no comment.
Streaming progress messages.
Non-nil on failure.
ListCheckpoints
historyFilter to return all manual checkpoints.
Context for the HTTP request.
Optional history filter expression. Pass
"" for no filter.List of checkpoints.
Non-nil on failure.
GetCheckpoint
Context for the HTTP request.
ID of the checkpoint to retrieve.
Checkpoint details.
Non-nil on failure.
RestoreCheckpoint
Context for the HTTP request.
ID of the checkpoint to restore from.
Streaming progress messages. Call
Next() to read *StreamMessage values, Close() when done.Non-nil on failure.
Network policy
GetNetworkPolicy
Context for the HTTP request.
Current network policy.
Non-nil on failure.
UpdateNetworkPolicy
Context for the HTTP request.
The new network policy to apply.
Non-nil on failure, including for invalid policy configurations.