Documentation
¶
Index ¶
Constants ¶
const DefaultEndpoint = "fzfyyzux8a5dhi"
DefaultEndpoint is the RunPod serverless endpoint used unless RUNPOD_ENDPOINT overrides it. The endpoint's deployment decides which image is pulled.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Endpoint string
APIKey string
HTTPClient *http.Client // optional; defaults to http.DefaultClient
}
Client submits jobs to a RunPod endpoint.
func New ¶
New builds a Client from the environment:
RUNNING_PHESANT RunPod API key (required) RUNPOD_ENDPOINT endpoint ID (optional; defaults to DefaultEndpoint)
It returns an error if the API key is not set.
func (*Client) Submit ¶
Submit sends one job to RunPod and returns the queued job ID. It returns as soon as the job is accepted; it does not wait for the run to finish.
func (*Client) SubmitFile ¶
SubmitFile reads the request YAML at yamlPath and submits it, returning the queued job ID.
func (*Client) Track ¶
Track polls RunPod every 30 seconds until the job completes or fails and returns the final status ("COMPLETED" or "FAILED").
The command does not call this — the workload reports its own completion via the request's NotifyOk/NotifyErr. It's here for the occasional case where you want to watch a run interactively from Go.