Adds a comment about the embedded struct.

This commit is contained in:
James Phillips 2016-03-04 17:07:52 -08:00
parent aa8cd2619d
commit 1cad6b9e0f
1 changed files with 6 additions and 0 deletions

View File

@ -20,7 +20,13 @@ func isUUID(str string) bool {
// queryWrapper is an internal structure that is used to store a query alongside
// its compiled template, which can be nil.
type queryWrapper struct {
// We embed the PreparedQuery structure so that the UUID field indexer
// can see the ID directly.
*structs.PreparedQuery
// ct is the compiled template, or nil if the query isn't a template. The
// state store manages this and keeps it up to date every time the query
// changes.
ct *prepared_query.CompiledTemplate
}