runpod

package
v0.265.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunPod

type RunPod struct {
	APIKey     string
	RestURL    string
	GraphQLURL string
	ProxyBase  string
	Client     *http.Client
	// contains filtered or unexported fields
}

RunPod rents GPU instances from RunPod and translates its API into compute's domain. The URLs default to RunPod's REST and GraphQL APIs and are fields so tests can use httptest. ProxyBase overrides the WaitReady URL in tests, and a zero pollInterval probes every 10s.

func NewRunPod

func NewRunPod(apiKey string) *RunPod

func (*RunPod) Destroy

func (r *RunPod) Destroy(ctx context.Context, id string) error

Destroy terminates an instance, and billing stops. CRUD: delete.

func (*RunPod) GPUTypes

func (r *RunPod) GPUTypes(ctx context.Context) ([]computedomain.GPUType, error)

GPUTypes returns rentable GPU types with live pricing, cheapest first. This is the one non-REST call (RunPod exposes pricing only via GraphQL).

func (*RunPod) List

List returns the instances infer rented, told by their name prefix. CRUD: read.

func (*RunPod) Provision

Provision rents a GPU instance. CRUD: create.

func (*RunPod) Status

func (r *RunPod) Status(ctx context.Context, id string) (computedomain.GPUInstance, error)

Status returns a single instance. CRUD: read.

func (*RunPod) URL

func (r *RunPod) URL(id string, port int) string

URL is the public HTTPS endpoint RunPod proxies to the instance's port.

func (*RunPod) WaitReady

func (r *RunPod) WaitReady(ctx context.Context, id string, port int, report func(string)) (computedomain.GPUInstance, error)

WaitReady polls the pod, then the llama.cpp /health endpoint through the proxy until the model answers. /health is unauthenticated in llama.cpp, so this needs no per-session token and works for `gpu status --wait` too.

Jump to

Keyboard shortcuts

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