jsonwrite

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package jsonwrite provides pooled buffers and atomic file writes for the bulk-alert pipeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuffer

func GetBuffer() *bytes.Buffer

GetBuffer returns a reset *bytes.Buffer from the pool.

func PutBuffer

func PutBuffer(b *bytes.Buffer)

PutBuffer returns a *bytes.Buffer to the pool. Buffers that have grown unreasonably large are discarded to avoid pinning large slices.

func WriteAtomic

func WriteAtomic(path string, data []byte) error

WriteAtomic writes data to path via a sibling .tmp file followed by rename, so readers tailing the directory never see a partially-written JSON file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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