io

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package io writes serialized JSON-RPC messages to an io.Writer with mutex-guarded concurrency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJSON

func WriteJSON(w io.Writer, mu *sync.Mutex, v any) error

WriteJSON marshals v as JSON and writes it to w, followed by a newline. The mutex serialises concurrent writes.

Parameters:

  • w: output stream
  • mu: mutex guarding w
  • v: value to marshal and write

Returns:

  • error: non-nil on marshal or write failure

Types

This section is empty.

Jump to

Keyboard shortcuts

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