protolazy

package
v1.36.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package protolazy controls the lazy implementation in the protobuf runtime.

The following logic determines whether lazy decoding is enabled:

  1. Lazy decoding is enabled by default, unless the environment variable GOPROTODEBUG=nolazy is set.
  2. If still on, calling protolazy.Disable() turns off lazy decoding.
  3. If still on, proto.UnmarshalOptions's NoLazyDecoding turns off lazy decoding for this Unmarshal operation only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable

func Disable() (reenable func())

Disable disables lazy unmarshaling of opaque messages.

Messages which are still on the OPEN or HYBRID API level (see https://protobuf.dev/reference/go/opaque-migration/) are never lazily unmarshalled.

Fields must be annotated with [lazy = true] in their .proto file to become eligible for lazy unmarshaling.

Types

This section is empty.

Jump to

Keyboard shortcuts

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