This page documents every exported type in the Sprites Go SDK. Types are grouped by concern. For method signatures that use these types, see the relevant API reference pages for proxy, filesystem, services, and checkpoints.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.
Sprite types
SpriteConfig
Hardware and region configuration applied when creating a sprite.Memory allocation in megabytes.
0 uses the platform default.Number of virtual CPUs.
0 uses the platform default.Target region (e.g.,
"iad", "lhr"). Empty string uses the nearest region.Persistent storage size in gigabytes.
0 uses the platform default.URLSettings
Authentication and access control settings for the sprite’s HTTP URL.Authentication method for the sprite’s public URL (e.g.,
"token").Controls whether the sprite’s URL is accessible only from within the organization’s network.
SpriteInfo
Full sprite metadata as returned by list and get operations.Unique platform-assigned identifier.
Human-readable name used in API calls.
Organization slug that owns the sprite.
Current status:
"running", "warm", "cold", or "stopped".Hardware configuration.
Environment variables set on the sprite.
Creation timestamp.
Last update timestamp.
Object storage bucket associated with the sprite.
Region where the sprite’s primary instance runs.
Public HTTPS URL of the sprite, if exposed.
Access control settings for the public URL.
User-defined labels for filtering and grouping.
When the sprite last entered the
running state.When the sprite last entered the
warm state.CreateSpriteRequest
Request body for creating a new sprite.Desired sprite name. Must be unique within the organization.
Optional hardware configuration. Platform defaults are used when
nil.Environment variables to set on the sprite at creation.
Labels to attach to the sprite.
UpdateSpriteRequest
Request body for updating a sprite’s settings.New URL access settings.
nil leaves the current settings unchanged.Labels to set or append.
When
true, removes all existing labels before applying Labels.CreateSpriteResponse
Response from a successful sprite creation request.The name of the created sprite.
OrgInfo
Aggregate statistics for all sprites in an organization, included in list responses.Organization slug.
Number of sprites currently in the
running state.Number of sprites in the
warm (suspended but fast-resumable) state.Number of sprites in the
cold state.Maximum number of simultaneously running sprites allowed.
Maximum number of simultaneously warm sprites allowed.
ListOptions
Pagination and filtering options for sprite list operations.Return only sprites whose names start with this prefix.
Maximum number of sprites to return per page.
0 uses the server default.Token from a previous
SpriteList.NextContinuationToken for paginating results.SpriteList
Paginated list of sprites returned by list operations.Sprites on this page.
Aggregate organization statistics. May be
nil.true when additional pages are available.Pass this value as
ListOptions.ContinuationToken to fetch the next page.OrganizationInfo
Organization context attached to aSprite instance at construction time.
Organization slug.
Base URL for the organization’s API endpoint.
ListResult
Result of a full sprite listing, including the aggregate organization stats.All sprites matching the query.
Organization-level aggregate statistics.
Session types
Session
Represents an active or historical execution session on a sprite.Unique session identifier.
Command that was executed to create this session.
Working directory the command ran in.
When the session was created.
Current throughput for the session’s I/O stream.
true if the session is still running.Timestamp of the last I/O activity.
nil if no activity has occurred.true if the session was started with a pseudo-TTY.ExecOptions
Options passed to command execution methods.Working directory for the command. Defaults to the sprite’s home directory.
Additional environment variables in
KEY=VALUE format.Allocate a pseudo-TTY for the process.
Attach to an existing session by ID instead of creating a new one.
Use the control channel for multiplexed execution.
Initial terminal width in columns when
TTY is true.Initial terminal height in rows when
TTY is true.Checkpoint types
Checkpoint
Metadata for a single sprite checkpoint.Unique checkpoint identifier used in restore and get calls.
When the checkpoint was created.
History branch identifiers associated with this checkpoint.
Optional human-readable label.
true for platform-managed automatic checkpoints.StreamMessage
Progress message emitted byCheckpointStream and RestoreStream.
Event type:
"info", "stdout", "stderr", or "error".Progress message or output data.
Error detail when
Type is "error".Proxy types
ProxyInitMessage
Initial handshake message sent over the WebSocket when establishing a proxy connection.Target hostname inside the sprite (e.g.,
"localhost", "10.0.0.1").Target port number (1–65535).
ProxyResponseMessage
Server response to aProxyInitMessage confirming the connection target.
"connected" on success; any other value indicates failure.Resolved
host:port that the proxy is forwarding to.PortNotificationMessage
Event emitted when a port is opened or closed inside a sprite."port_opened" or "port_closed".Port number.
Address the port is bound to, e.g.,
"127.0.0.1" or "0.0.0.0".Process ID that opened or closed the port.
Service types
Service
Definition of a managed service.Service identifier.
Executable to run.
Command arguments.
Services that must be running before this one starts.
Port the service’s HTTP interface listens on. Used for health checking.
ServiceState
Runtime state of a service.Service name.
One of
"stopped", "starting", "running", "stopping", or "failed".Process ID when the service is running;
0 otherwise.Timestamp of the most recent start.
Error detail when
Status is "failed".Number of automatic restarts since the service was created.
Scheduled time for the next automatic restart attempt.
ServiceWithState
Combined service definition and runtime state, as returned byListServices and GetService.
Current runtime state.
nil if the service has never been started.ServiceRequest
Request body used withCreateService and CreateServiceWithDuration.
Executable to run (e.g.,
"node", "/usr/bin/python3").Arguments passed to the executable.
Names of services that must be running before this service starts.
Optional HTTP port for health checking.
ServiceLogEvent
A single event from aServiceStream.
Event type:
"stdout", "stderr", "exit", "error", "complete", "started", "stopping", or "stopped".Log line or status message.
Exit code, present on
"exit" events.Unix timestamp in milliseconds.
Map of log file names to their paths on the sprite. Present on
"complete" events.Network policy types
NetworkPolicyRule
A single rule in a network egress policy.Hostname or domain pattern to match. Omit for a catch-all rule.
"allow" to permit traffic or "deny" to block it.Optional name of a named policy to inline at this rule’s position.
NetworkPolicy
Complete egress policy for a sprite.Ordered list of rules evaluated top to bottom. The first matching rule wins.