runpod

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

func Notify

func Notify(message string) error

Notify posts a message to the ntfy topic arti2. This is optional; completion notifications normally come from the workload itself. NTFY_API_TOKEN supplies the bearer token.

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

func New() (*Client, error)

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

func (c *Client) Submit(appName, yamlText string) (string, error)

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

func (c *Client) SubmitFile(appName, yamlPath string) (string, error)

SubmitFile reads the request YAML at yamlPath and submits it, returning the queued job ID.

func (*Client) Track

func (c *Client) Track(jobID string) (string, error)

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.

Jump to

Keyboard shortcuts

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