orca

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 17 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

Overview

Package orca puts Orca's sessions and board behind the core's ports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

func New

func New(m *wsorca.Manager, cfg Columns, links func(context.Context) (map[pr.Ref]Link, error)) *Adapter

New is an adapter whose every read asks m.

func Ports

func Ports(ws workspace.Manager, cols Columns, links func(context.Context) (map[pr.Ref]Link, error)) (*Adapter, error)

Ports puts an Orca workspace manager behind the sessions and board ports. On a *workspace.Cached the adapter reads its cache and invalidates it on each write.

func (*Adapter) Agents

func (a *Adapter) Agents(ctx context.Context) ([]turns.AgentObservation, error)

func (*Adapter) Apply

func (a *Adapter) Apply(ctx context.Context, items []view.Item, force map[unit.Unit]bool) ([]view.Applied, error)

Apply writes the review items to the pull request's review workspace and the author items to its own one; an item without that workspace is skipped. A card that already shows what an item would write is not written again. The board is read from the cache, and read again fresh before any write so a card is never overwritten on a stale column.

func (*Adapter) Census

func (a *Adapter) Census(ctx context.Context) (turns.ProcessCensus, error)

func (*Adapter) Close

func (a *Adapter) Close(ctx context.Context, handle string) error

func (*Adapter) LastAgents

func (a *Adapter) LastAgents() (agents []turns.AgentObservation, ok bool)

LastAgents are the agents of the cache's recent snapshot, without asking Orca; ok is false while the panes the cache holds are missing, too old or from another Orca runtime.

func (*Adapter) Manages

func (a *Adapter) Manages(role view.Role, column string) bool

func (*Adapter) Name

func (a *Adapter) Name() string

func (*Adapter) Placements

func (a *Adapter) Placements(ctx context.Context) (map[unit.Unit]string, error)

func (*Adapter) Processes

func (a *Adapter) Processes(ctx context.Context, workspaceID string) ([]turns.Process, error)

func (*Adapter) Refresh

func (a *Adapter) Refresh()

func (*Adapter) Status

func (a *Adapter) Status(role view.Role, column string) view.Status

Status is the status whose column on the board is column, None when the sink does not write that column for role.

func (*Adapter) Type

func (a *Adapter) Type(ctx context.Context, handle, line string) (bool, error)

func (*Adapter) WaitIdle

func (a *Adapter) WaitIdle(ctx context.Context, handle string, timeout time.Duration) (bool, error)

func (*Adapter) WatchAgents

func (a *Adapter) WatchAgents(ctx context.Context, note func(units []unit.Unit))

WatchAgents calls note with the units linked to the workspaces whose agents, terminals or card moved, after each load of the cache that moved any, and with nil when the links cannot be read; the links are read under ctx.

type Columns

type Columns struct {
	ReviewStatus, ReviewFallbackStatus, NeedsMeStatus, ReviewedStatus string
	InProgressStatus, InReviewStatus, ReadyStatus, CompletedStatus    string
	// AuthorColumns makes the author role own in-review, ready and completed;
	// set it with views.Service.Facts.
	AuthorColumns bool
}

Columns are the board columns the configuration names.

type Link struct {
	WorkspaceID string
	Review      bool
}

Link is a pull request's workspace as the inventory last saw it.

Jump to

Keyboard shortcuts

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