Documentation ¶
Index ¶
- Variables
- type ApplyOrRemoveDropPoliciesResult
- type ForwardMetadata
- type Metadata
- type PipelineMetadata
- func (m PipelineMetadata) Clone() PipelineMetadata
- func (m PipelineMetadata) Equal(other PipelineMetadata) bool
- func (m *PipelineMetadata) FromProto(pb metricpb.PipelineMetadata) error
- func (m PipelineMetadata) IsDefault() bool
- func (m PipelineMetadata) IsDropPolicyApplied() bool
- func (m PipelineMetadata) ToProto(pb *metricpb.PipelineMetadata) error
- type PipelineMetadatas
- type StagedMetadata
- type StagedMetadatas
- func (sms StagedMetadatas) ApplyOrRemoveDropPolicies() (StagedMetadatas, ApplyOrRemoveDropPoliciesResult)
- func (sms StagedMetadatas) Equal(other StagedMetadatas) bool
- func (sms *StagedMetadatas) FromProto(pb metricpb.StagedMetadatas) error
- func (sms StagedMetadatas) IsDefault() bool
- func (sms StagedMetadatas) IsDropPolicyApplied() bool
- func (sms StagedMetadatas) ToProto(pb *metricpb.StagedMetadatas) error
- type TimedMetadata
- type VersionedStagedMetadatas
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultPipelineMetadata is a default pipeline metadata. DefaultPipelineMetadata PipelineMetadata // DefaultPipelineMetadatas is a default list of pipeline metadatas. DefaultPipelineMetadatas = PipelineMetadatas{DefaultPipelineMetadata} // DefaultMetadata is a default metadata. DefaultMetadata = Metadata{Pipelines: DefaultPipelineMetadatas} // DefaultStagedMetadata is a default staged metadata. DefaultStagedMetadata = StagedMetadata{Metadata: DefaultMetadata} // DefaultStagedMetadatas represents default staged metadatas. DefaultStagedMetadatas = StagedMetadatas{DefaultStagedMetadata} // DropPipelineMetadata is the drop policy pipeline metadata. DropPipelineMetadata = PipelineMetadata{DropPolicy: policy.DropMust} // DropPipelineMetadatas is the drop policy list of pipeline metadatas. DropPipelineMetadatas = []PipelineMetadata{DropPipelineMetadata} // DropMetadata is the drop policy metadata. DropMetadata = Metadata{Pipelines: DropPipelineMetadatas} // DropStagedMetadata is the drop policy staged metadata. DropStagedMetadata = StagedMetadata{Metadata: DropMetadata} // DropStagedMetadatas is the drop policy staged metadatas. DropStagedMetadatas = StagedMetadatas{DropStagedMetadata} )
Functions ¶
This section is empty.
Types ¶
type ApplyOrRemoveDropPoliciesResult ¶
type ApplyOrRemoveDropPoliciesResult uint
ApplyOrRemoveDropPoliciesResult is the result of applying or removing the drop policies for pipelines.
const ( // AppliedEffectiveDropPolicyResult is the result of applying the drop // policy and returning just the single drop policy pipeline. AppliedEffectiveDropPolicyResult ApplyOrRemoveDropPoliciesResult = iota // RemovedIneffectiveDropPoliciesResult is the result of no drop policies // being effective and returning the pipelines without any drop policies. RemovedIneffectiveDropPoliciesResult )
type ForwardMetadata ¶
type ForwardMetadata struct { // List of aggregation types. AggregationID aggregation.ID // Storage policy. StoragePolicy policy.StoragePolicy // Pipeline of operations that may be applied to the metric. Pipeline applied.Pipeline // Metric source id that refers to the unique id of the source producing this metric. SourceID uint32 // Number of times this metric has been forwarded. NumForwardedTimes int }
ForwardMetadata represents the metadata information associated with forwarded metrics.
func (*ForwardMetadata) FromProto ¶
func (m *ForwardMetadata) FromProto(pb metricpb.ForwardMetadata) error
FromProto converts the protobuf message to a forward metadata in place.
func (ForwardMetadata) ToProto ¶
func (m ForwardMetadata) ToProto(pb *metricpb.ForwardMetadata) error
ToProto converts the forward metadata to a protobuf message in place.
type Metadata ¶
type Metadata struct {
Pipelines PipelineMetadatas `json:"pipelines"`
}
Metadata represents the metadata associated with a metric.
func (Metadata) IsDropPolicyApplied ¶
IsDropPolicyApplied returns whether this is the default metadata but with the drop policy applied.
type PipelineMetadata ¶
type PipelineMetadata struct { // List of aggregation types. AggregationID aggregation.ID `json:"aggregation"` // List of storage policies. StoragePolicies policy.StoragePolicies `json:"storagePolicies"` // Pipeline operations. Pipeline applied.Pipeline `json:"-"` // NB: not needed for JSON marshaling for now. // Drop policy. DropPolicy policy.DropPolicy `json:"dropPolicy,omitempty"` }
PipelineMetadata contains pipeline metadata.
func (PipelineMetadata) Clone ¶
func (m PipelineMetadata) Clone() PipelineMetadata
Clone clones the pipeline metadata.
func (PipelineMetadata) Equal ¶
func (m PipelineMetadata) Equal(other PipelineMetadata) bool
Equal returns true if two pipeline metadata are considered equal.
func (*PipelineMetadata) FromProto ¶
func (m *PipelineMetadata) FromProto(pb metricpb.PipelineMetadata) error
FromProto converts the protobuf message to a pipeline metadata in place.
func (PipelineMetadata) IsDefault ¶
func (m PipelineMetadata) IsDefault() bool
IsDefault returns whether this is the default standard pipeline metadata.
func (PipelineMetadata) IsDropPolicyApplied ¶
func (m PipelineMetadata) IsDropPolicyApplied() bool
IsDropPolicyApplied returns whether this is the default standard pipeline but with the drop policy applied.
func (PipelineMetadata) ToProto ¶
func (m PipelineMetadata) ToProto(pb *metricpb.PipelineMetadata) error
ToProto converts the pipeline metadata to a protobuf message in place.
type PipelineMetadatas ¶
type PipelineMetadatas []PipelineMetadata
PipelineMetadatas is a list of pipeline metadatas.
func (PipelineMetadatas) ApplyOrRemoveDropPolicies ¶
func (metadatas PipelineMetadatas) ApplyOrRemoveDropPolicies() ( PipelineMetadatas, ApplyOrRemoveDropPoliciesResult, )
ApplyOrRemoveDropPolicies applies or removes any drop policies, if effective then just the drop pipeline is returned otherwise if not effective it returns the drop policy pipelines that were not effective.
func (PipelineMetadatas) Clone ¶
func (metadatas PipelineMetadatas) Clone() PipelineMetadatas
Clone clones the list of pipeline metadatas.
func (PipelineMetadatas) Equal ¶
func (metadatas PipelineMetadatas) Equal(other PipelineMetadatas) bool
Equal returns true if two pipline metadatas are considered equal.
type StagedMetadata ¶
type StagedMetadata struct { Metadata `json:"metadata"` // Cutover is when the metadata is applicable. CutoverNanos int64 `json:"cutoverNanos"` // Tombstoned determines whether the associated metric has been tombstoned. Tombstoned bool `json:"tombstoned"` }
StagedMetadata represents metadata with a staged cutover time.
func (StagedMetadata) Equal ¶
func (sm StagedMetadata) Equal(other StagedMetadata) bool
Equal returns true if two staged metadatas are considered equal.
func (*StagedMetadata) FromProto ¶
func (sm *StagedMetadata) FromProto(pb metricpb.StagedMetadata) error
FromProto converts the protobuf message to a staged metadata in place.
func (StagedMetadata) IsDefault ¶
func (sm StagedMetadata) IsDefault() bool
IsDefault returns whether this is a default staged metadata.
func (StagedMetadata) IsDropPolicyApplied ¶
func (sm StagedMetadata) IsDropPolicyApplied() bool
IsDropPolicyApplied returns whether this is the default staged metadata but with the drop policy applied.
func (StagedMetadata) ToProto ¶
func (sm StagedMetadata) ToProto(pb *metricpb.StagedMetadata) error
ToProto converts the staged metadata to a protobuf message in place.
type StagedMetadatas ¶
type StagedMetadatas []StagedMetadata
StagedMetadatas contains a list of staged metadatas.
func (StagedMetadatas) ApplyOrRemoveDropPolicies ¶
func (sms StagedMetadatas) ApplyOrRemoveDropPolicies() ( StagedMetadatas, ApplyOrRemoveDropPoliciesResult, )
ApplyOrRemoveDropPolicies applies or removes any drop policies staged metadatas, if effective then just a single drop pipeline staged metadata is returned otherwise if not effective it removes in each staged metadata the drop policy from all pipelines and retains only non-drop policy effective staged metadatas.
func (StagedMetadatas) Equal ¶
func (sms StagedMetadatas) Equal(other StagedMetadatas) bool
Equal returns true if two staged metadatas slices are considered equal.
func (*StagedMetadatas) FromProto ¶
func (sms *StagedMetadatas) FromProto(pb metricpb.StagedMetadatas) error
FromProto converts the protobuf message to a staged metadatas in place.
func (StagedMetadatas) IsDefault ¶
func (sms StagedMetadatas) IsDefault() bool
IsDefault determines whether the list of staged metadata is a default list.
func (StagedMetadatas) IsDropPolicyApplied ¶
func (sms StagedMetadatas) IsDropPolicyApplied() bool
IsDropPolicyApplied returns whether the list of staged metadata is the default list but with the drop policy applied.
func (StagedMetadatas) ToProto ¶
func (sms StagedMetadatas) ToProto(pb *metricpb.StagedMetadatas) error
ToProto converts the staged metadatas to a protobuf message in place.
type TimedMetadata ¶
type TimedMetadata struct { // List of aggregation types. AggregationID aggregation.ID // Storage policy. StoragePolicy policy.StoragePolicy }
TimedMetadata represents the metadata information associated with timed metrics.
func (*TimedMetadata) FromProto ¶
func (m *TimedMetadata) FromProto(pb metricpb.TimedMetadata) error
FromProto converts the protobuf message to a timed metadata in place.
func (TimedMetadata) ToProto ¶
func (m TimedMetadata) ToProto(pb *metricpb.TimedMetadata) error
ToProto converts the timed metadata to a protobuf message in place.
type VersionedStagedMetadatas ¶
type VersionedStagedMetadatas struct { Version int `json:"version"` StagedMetadatas StagedMetadatas `json:"stagedMetadatas"` }
VersionedStagedMetadatas is a versioned staged metadatas.