planblob

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package planblob is the encoding of the opaque plan a pod stores and hands back on /v1/state: zstd over the plan's JSON, raw bytes on the wire. pkg/compression base64s its output, which the multipart part has no use for.

Both ends of the blob compile this package — the controller writes it, the controller and `haptic diff` read it back — so a pod's baseline is decoded by exactly one implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(blob []byte) (*renderplan.Plan, error)

Decode reads a blob back. The caller checks the plan id and schema version against what the pod reports: a plan that decodes is not yet a plan that describes this pod.

func DecodeCheckpoint

func DecodeCheckpoint(encoded, config string, files map[string]string) (*renderplan.Plan, error)

DecodeCheckpoint restores exact bytes without parsing HAProxy configuration. The caller must bind the result to an authenticated renderoutput snapshot.

func Encode

func Encode(plan *renderplan.Plan) ([]byte, error)

Encode produces the blob for one plan. It carries the plan id, so a decode can prove what it decoded.

func EncodeCheckpoint

func EncodeCheckpoint(plan *renderplan.Plan) (string, error)

EncodeCheckpoint preserves declarations that cannot be recovered from file bytes.

func EncodeSnapshot

func EncodeSnapshot(snapshot *renderplan.Snapshot) ([]byte, error)

EncodeSnapshot is Encode for the snapshot a render sealed: the same bytes, streamed from the fragments the snapshot already holds instead of a plan re-encoded from scratch on every deployment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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