Documentation ¶
Overview ¶
Package protoutil provides helper functions for working with well-known protobuf types.
It aims to serve a purpose similar to packages topoproto and mysqlctlproto, but for general, common types, rather than types related to a particular Vitess RPC service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationFromProto ¶
DurationFromProto converts a durationpb type to a time.Duration. It returns a three-tuple of (dgo, ok, err) where dgo is the go time.Duration, ok indicates whether the proto value was set, and err is set on failure to convert the proto value.
func DurationToProto ¶
DurationToProto converts a time.Duration to a durpb.Duration.
func TimeFromProto ¶ added in v0.11.0
TimeFromProto converts a vttime.Time proto message into a time.Time object.
Types ¶
This section is empty.