package protolazy
import "google.golang.org/protobuf/runtime/protolazy"
Package protolazy controls the lazy implementation in the protobuf runtime.
The following logic determines whether lazy decoding is enabled:
- Lazy decoding is enabled by default, unless the environment variable GOPROTODEBUG=nolazy is set.
- If still on, calling protolazy.Disable() turns off lazy decoding.
- If still on, proto.UnmarshalOptions's NoLazyDecoding turns off lazy decoding for this Unmarshal operation only.
Index ¶
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.
Source Files ¶
protolazy.go
- Version
- v1.36.5 (latest)
- Published
- Feb 6, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 4 hours ago –
Tools for package owners.