Unify layered provenance history
This commit is contained in:
10
metadata.go
10
metadata.go
@@ -1,7 +1,7 @@
|
||||
package configkit
|
||||
|
||||
// Metadata provides detached presence, origin, and history queries for a load.
|
||||
// Its zero value contains no paths.
|
||||
// Metadata provides detached effective presence/origin and chronological history
|
||||
// queries for a load. Its zero value contains no paths.
|
||||
type Metadata struct {
|
||||
fields map[string]FieldInfo
|
||||
history map[string][]Change
|
||||
@@ -27,8 +27,10 @@ func (m Metadata) IsExplicit(path Path) bool {
|
||||
return ok && info.Explicit
|
||||
}
|
||||
|
||||
// History returns detached definition and resolution records for path. Unknown and
|
||||
// invalid paths return nil.
|
||||
// History returns detached definition and resolution records for path. A record's
|
||||
// Path can be an ancestor when that container operation replaced or removed path.
|
||||
// Removed historical paths can have history even though Lookup returns false.
|
||||
// Unknown and invalid paths return nil.
|
||||
func (m Metadata) History(path Path) []Change {
|
||||
if !path.valid() {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user