Help us shape the future of Go! Take the 2026 Go Developer Survey

lavaflow

package
v0.52.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lavaflow performs the LavaFlow workflows behind the volcano cloud lavaflow subcommands. LavaFlow reads a project's runtime errors, diagnoses the issues they group into, and opens pull requests that fix them.

Index

Constants

View Source
const (
	RepositoryConnected    = "connected"
	RepositoryNotConnected = "not_connected"
	// RepositoryUnknown means the connection could not be read, so the status
	// says nothing about it rather than claim none is connected.
	RepositoryUnknown = "unknown"
)

Whether a repository is connected for LavaFlow's fix pull requests.

View Source
const CostNote = "LavaFlow is in preview. During the preview, it needs the SUPERAGENT plan."

CostNote is what LavaFlow needs during the preview, worded as the dashboard, the pricing page and the public docs word it. It names no billing model.

View Source
const MaxRunsLimit = 100

MaxRunsLimit is the largest page of runs the API returns.

View Source
const OnDescription = "LavaFlow uses AI to diagnose this project's errors from their logs and deployed source, " +
	"and opens fix pull requests in your connected repository."

OnDescription says what LavaFlow does, and that it uses AI to do it, in the wording approved for that disclosure. Keep it verbatim: it opens the help, enable's output and the docs.

Variables

View Source
var ErrUnavailable = errors.New("LavaFlow isn't available on this Volcano API")

ErrUnavailable reports an API where LavaFlow is not on: a platform release older than LavaFlow, which has none of its routes, or one where Volcano has not turned it on or has switched it off. Said in place of the 404 either answers, which otherwise reads as a missing project or run.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service performs LavaFlow workflows against the current project.

func NewService

func NewService(deps cliruntime.Deps) Service

NewService returns a LavaFlow service.

func (Service) GetRun

func (s Service) GetRun(ctx context.Context, rawID string) (*apiclient.LavaFlowRun, error)

GetRun returns one of the current project's runs.

func (Service) ListRuns

func (s Service) ListRuns(ctx context.Context, limit int, cursor string) (*apiclient.PaginatedLavaFlowRuns, error)

ListRuns returns one page of the current project's runs, newest first. cursor is "" for the first page.

func (Service) Repository

func (s Service) Repository(ctx context.Context) (state, name string, err error)

Repository says which repository LavaFlow's fix pull requests go to, for a project whose LavaFlow settings were just read or saved: its state, and its full name when it is connected. Only a cancel or deadline is an error.

func (Service) SetEnabled

func (s Service) SetEnabled(ctx context.Context, enabled bool) (*apiclient.LavaFlowSettings, error)

SetEnabled turns LavaFlow on or off for the current project. The update changes only the fields it sends, so it sends enabled alone: a manifest's max_stage and auto_trigger stay as they are.

func (Service) StartRun

func (s Service) StartRun(ctx context.Context, rawIssueID string) (*apiclient.LavaFlowRun, error)

StartRun queues a run that diagnoses an issue of the current project.

func (Service) Status

func (s Service) Status(ctx context.Context) (*Status, error)

Status returns the current project's LavaFlow settings and its repository connection.

type Status

type Status struct {
	Settings        *apiclient.LavaFlowSettings `json:"settings"`
	RepositoryState string                      `json:"repository_state"`
	// Repository is the connected repository's full name, set only when
	// RepositoryState is RepositoryConnected.
	Repository string `json:"repository,omitempty"`
}

Status is a project's LavaFlow settings and whether a repository is connected for its fix pull requests.

Jump to

Keyboard shortcuts

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