Documentation ¶
Overview ¶
Package textproto implements a textproto config service Resolver.
It uses the "luci-go" text protobuf multi-line extension. For more information, see: go.chromium.org/luci/common/proto
The textproto protobuf Resolver internally formats its content as a binary protobuf, rather than its raw text content. This has some advantages over raw text content caching:
- More space-efficient.
- Decodes faster.
- If the config service protobuf schema differs from the application's compiled schema, and the schema change is responsible (adding, renaming, repurposing) the binary cache value will continue to load where the text protobuf would fail.
Index ¶
Constants ¶
const BinaryFormat = "github.com/TriggerMail/luci-go/server/config/TextProto:binary"
BinaryFormat is the resolver's binary protobuf format string.
Variables ¶
This section is empty.
Functions ¶
func Message ¶
Message is a cfgclient.Resolver that resolves config data into proto.Message instances by parsing the config data as a text protobuf.
func Slice ¶
func Slice(out interface{}) interface { cfgclient.MultiResolver cfgclient.FormattingResolver }
Slice is a cfgclient.MultiResolver which resolves a slice of configurations into a TextProto.
out must be a pointer to a slice of some proto.Message implementation. If it isn't, this function will panic.
For example:
var out []*MyProtoMessages TextProtoSlice(&out)