decode

package
v0.2.10 Latest Latest
Warning

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

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

Documentation

Overview

Package decode implements the `fxadmin decode` command, which converts a binary config block into the human-editable JSON of the common.Config it carries. It reproduces `configtxlator proto_decode --type common.Block` followed by extracting the embedded common.Config, so the output is the shape `fxadmin compute-update` consumes: an admin edits this JSON and feeds the original and edited copies back to compute-update.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

Handler executes the decode command.

func New

func New() *Handler

New returns a decode command handler.

func (*Handler) Run

func (*Handler) Run(blockPath, outputPath string) error

Run implements `fxadmin decode`. It reads the binary config block at blockPath, extracts the embedded common.Config, and writes its JSON rendering to outputPath. The output is written only after the block decodes successfully, so a malformed block never clobbers an existing destination.

Jump to

Keyboard shortcuts

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