Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
Add helper IsDropPolicyApplied to StagedMetadatas type
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Skillington committed Jun 29, 2018
1 parent e591aef commit f6a2278
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ func (sms StagedMetadatas) IsDefault() bool {
return len(sms) == 1 && sms[0].IsDefault()
}

// IsDropPolicyApplied returns whether the list of staged metadata is the
// default list but with the drop policy applied.
func (sms StagedMetadatas) IsDropPolicyApplied() bool {
return len(sms) == 1 && sms[0].IsDropPolicyApplied()
}

// ToProto converts the staged metadatas to a protobuf message in place.
func (sms StagedMetadatas) ToProto(pb *metricpb.StagedMetadatas) error {
numMetadatas := len(sms)
Expand Down

0 comments on commit f6a2278

Please sign in to comment.