util

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package util contains common utilities for working with boxcutter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSHA256Hash

func ComputeSHA256Hash(obj any, collisionCount *uint32) string

ComputeSHA256Hash returns a sha236 hash value calculated from pod template and a collisionCount to avoid hash collision. The hash will be safe encoded to avoid bad words.

func DeepHashObject

func DeepHashObject(hasher hash.Hash, objectToWrite any)

DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.

func SummarizeRevisionResult added in v0.8.1

func SummarizeRevisionResult(result machinery.RevisionResult) string

SummarizeRevisionResult creates a concise, human-readable summary of a boxcutter RevisionResult, extracting key information without the verbose details of String(). This is similar to how crdupgradesafety.conciseUnhandledMessage works for CRD diffs.

func SummarizeRevisionTeardownResult added in v0.8.1

func SummarizeRevisionTeardownResult(result machinery.RevisionTeardownResult) string

SummarizeRevisionTeardownResult creates a concise summary of a teardown result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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