status

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package status holds the sealed queue status type and its three cases. They are re-exported from the top-level fal package (fal.Status, fal.Queued, ...).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Completed

type Completed struct {
	Logs      []map[string]any
	Metrics   map[string]any
	Error     string
	ErrorType string
}

Completed means the request has finished (successfully or with an error). It mirrors fal_client.Completed.

type InProgress

type InProgress struct {
	Logs []map[string]any
}

InProgress means the request is executing. It mirrors fal_client.InProgress.

type Queued

type Queued struct {
	Position int
}

Queued means the request is waiting in the queue. It mirrors fal_client.Queued.

type Status

type Status interface {
	// contains filtered or unexported methods
}

Status is the sealed result of a queue status poll. The only implementations are Queued, InProgress and Completed; the unexported isStatus method prevents other packages from adding cases, so a type switch over these three is effectively exhaustive.

switch s := st.(type) {
case status.Queued:     // s.Position
case status.InProgress: // s.Logs
case status.Completed:  // s.Metrics, s.Error
}

func Parse

func Parse(data []byte) (Status, error)

Parse decodes a status-endpoint payload into one of the Status types.

Jump to

Keyboard shortcuts

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