runnerio

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package runnerio bridges authenticated runner calls to local byte streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server retains output across connections; interactive resources belong to one peer.

func New

func New(sub substrate.Substrate, runnerID, stateDir string) (*Server, error)

New opens private output storage beneath the runner's state directory.

func (*Server) BindOutput

func (s *Server) BindOutput(id uuid.UUID, ref string) error

BindOutput associates a successful sandbox with its retained output.

func (*Server) Call

func (s *Server) Call(ctx context.Context, peer *runnerwire.Peer, id uint32, method string, args json.RawMessage) (any, error)

Call implements stream RPCs after the session's authenticated admission checks.

func (*Server) EraseOutput

func (s *Server) EraseOutput(id uuid.UUID) error

EraseOutput deletes a run's retained output, for an org-erased run whose quarantined evidence reached its retention ceiling. It is idempotent.

func (*Server) ForgetOutput

func (s *Server) ForgetOutput(id uuid.UUID) error

ForgetOutput removes a failed new run's output; never call it for a retry of an existing run.

func (*Server) HoldSandboxes

func (s *Server) HoldSandboxes(holds func(localRef string) bool)

HoldSandboxes sets the runner's record of the sandboxes it created and still holds. Attach and exec reach no other ref; without it they reach none.

func (*Server) Offline

func (s *Server) Offline(peer *runnerwire.Peer)

Offline releases only this connection's stream resources; sandboxes and output buffers survive.

func (*Server) Online

func (s *Server) Online(peer *runnerwire.Peer)

Online reopens retained output only after the caller has completed pending actions and READY.

func (*Server) Output

func (s *Server) Output(id uuid.UUID) (io.Writer, error)

Output returns the idempotent per-run writer; disk failures refuse sandbox creation.

func (*Server) OutputSettled

func (s *Server) OutputSettled(ctx context.Context, id uuid.UUID, ref string) (int64, bool, error)

OutputSettled reads producer completion and durable byte acknowledgement. It never closes a producer, advances its cursor or forgets retained output.

func (*Server) ReleaseOutput

func (s *Server) ReleaseOutput(id uuid.UUID, ref string) error

ReleaseOutput deletes a run's retained output once OutputSettled holds for ref. Releasing output that is already gone succeeds.

Jump to

Keyboard shortcuts

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