From f6a2278bde7d96c4bc930fa285b9cc4bac7c834c Mon Sep 17 00:00:00 2001 From: Rob Skillington Date: Fri, 29 Jun 2018 11:57:32 -0400 Subject: [PATCH] Add helper IsDropPolicyApplied to StagedMetadatas type --- metadata/metadata.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/metadata/metadata.go b/metadata/metadata.go index 319218f..1329744 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -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)