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 SortBinlogSourceTables ¶
func SortBinlogSourceTables(bls *binlogdatapb.BinlogSource)
SortBinlogSourceTables sorts the table related contents of the BinlogSource struct lexicographically by table name in order to produce consistent results.
func TimeFromProto ¶
TimeFromProto converts a vttime.Time proto message into a time.Time object.
Types ¶
This section is empty.