// PushRequest defines a request to push to proxies
// It is used to send updates to the config update debouncer and pass to the PushQueue.
type PushRequest struct {
// Full determines whether a full push is required or not. If false, an incremental update will be sent.
// Incremental pushes:
// * Do not recompute the push context
// * Do not recompute proxy state (such as ServiceInstances)
// * Are not reported in standard metrics such as push time
// As a result, configuration updates should never be incremental. Generally, only EDS will set this, but
// in the future SDS will as well.
Full bool
// ConfigsUpdated keeps track of configs that have changed.
// This is used as an optimization to avoid unnecessary pushes to proxies that are scoped with a Sidecar.
// If this is empty, then all proxies will get an update.
// Otherwise only proxies depend on these configs will get an update.
// The kind of resources are defined in pkg/config/schemas.
ConfigsUpdated map[ConfigKey]struct{}
// Push stores the push context to use for the update. This may initially be nil, as we will
// debounce changes before a PushContext is eventually created.
Push *PushContext
// Start represents the time a push was started. This represents the time of adding to the PushQueue.
// Note that this does not include time spent debouncing.
Start time.Time
// Reason represents the reason for requesting a push. This should only be a fixed set of values,
// to avoid unbounded cardinality in metrics. If this is not set, it may be automatically filled in later.
// There should only be multiple reasons if the push request is the result of two distinct triggers, rather than
// classifying a single trigger as having multiple reasons.
Reason []TriggerReason
}