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 http://go/go-opaque-proto) 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.1
- Published
- Dec 23, 2024
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 1 hour ago –
Tools for package owners.