delivery

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package delivery writes review output to local destinations.

Index

Constants

View Source
const (
	MaxPayloadBytes         int64 = 16 << 20
	MaxClipboardStdoutBytes int64 = 64 << 10
	MaxClipboardStderrBytes int64 = 1 << 20
	// MaxClipboardErrorConstructionBytes includes captured stderr plus bounded
	// terminal-safe retained and formatted error representations.
	MaxClipboardErrorConstructionBytes int64 = MaxClipboardStderrBytes + 2*(16<<10) + 256
)

MaxPayloadBytes defines the supported payload bytes limit.

Variables

View Source
var (
	ErrUnavailable = errors.New("delivery destination is unavailable")
	ErrBusy        = errors.New("delivery destination already has an active operation")
	ErrUnknown     = errors.New("delivery may have committed and is fenced")
	ErrLimited     = errors.New("delivery command output exceeded its limit")
)

ErrUnavailable identifies an unavailable failure.

Functions

This section is empty.

Types

type CommitState

type CommitState uint8

CommitState describes commit state.

const (
	CommitFailedBeforeWrite CommitState = iota + 1
	CommitSucceeded
	CommitUnknown
)

CommitFailedBeforeWrite identifies a supported commit failed before write value.

type Manager

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

Manager represents manager.

func NewManager

func NewManager() *Manager

NewManager constructs a manager.

func (*Manager) Close

func (manager *Manager) Close(ctx context.Context) error

Close performs the close operation.

func (*Manager) Deliver

func (manager *Manager) Deliver(
	ctx context.Context,
	payload Payload,
) (Outcome, error)

Deliver performs the deliver operation.

func (*Manager) Escalate

func (manager *Manager) Escalate()

Escalate performs the escalate operation.

type Outcome

type Outcome struct {
	State CommitState
	Bytes int64
}

Outcome describes outcome.

type Payload

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

Payload represents payload.

func NewPayload

func NewPayload(body string) (Payload, error)

NewPayload constructs and validates payload.

func (Payload) Bytes

func (payload Payload) Bytes() int64

Bytes returns the receiver's bytes value.

Jump to

Keyboard shortcuts

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