out

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package out provides utility functions for application initialization output, including banner display and memory locking operations. These functions are typically called during the startup phase of SPIKE applications to provide consistent initialization behavior across all components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogMemLock

func LogMemLock(appName string)

LogMemLock attempts to lock the application's memory to prevent sensitive data from being swapped to disk. It logs the result of the operation. If memory locking succeeds, a success message is logged. If it fails, a warning is logged only if SPIKE_SHOW_MEMORY_WARNING is enabled.

Parameters:

  • appName: The name of the application, used as a prefix in log messages

func Preamble

func Preamble(appName, appVersion string)

Preamble performs standard application initialization output by printing the application banner and attempting to lock memory. This function should be called during application startup.

Parameters:

  • appName: The name of the application (e.g., "SPIKE Nexus")
  • appVersion: The version string of the application (e.g., "1.0.0")

func PrintBanner

func PrintBanner(appName, appVersion string)

PrintBanner outputs the application banner to standard output, including the application name, version, log level, and FIPS 140.3 status. The banner is only printed if the SPIKE_BANNER_ENABLED environment variable is set to true.

Parameters:

  • appName: The name of the application (e.g., "SPIKE Nexus")
  • appVersion: The version string of the application (e.g., "1.0.0")

Types

This section is empty.

Jump to

Keyboard shortcuts

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