package pipeline

// EvidenceContextPolicy controls optional source-context publication by an
// output encoder.
type EvidenceContextPolicy struct {
	Enabled     bool
	WindowUnits int
	LaneIDs     []string
}

// EvidenceContextPolicyProvider is implemented by output encoders that opt in
// to evidence-context publication.
type EvidenceContextPolicyProvider interface {
	EvidenceContextPolicy() EvidenceContextPolicy
}

func cloneEvidenceContextPolicy(policy EvidenceContextPolicy) EvidenceContextPolicy {
	policy.LaneIDs = append([]string(nil), policy.LaneIDs...)
	return policy
}
