Documentation ¶
Index ¶
- Variables
- func ExtendLabels(lset labels.Labels, extend labels.Labels) labels.Labels
- func LabelSetsToPromLabelSets(lss ...LabelSet) []labels.Labels
- func LabelsToPromLabels(lset []Label) labels.Labels
- func PromLabelSetsToString(lsets []labels.Labels) string
- type FullCopyLabel
- func (*FullCopyLabel) Descriptor() ([]byte, []int)
- func (m *FullCopyLabel) Marshal() (dAtA []byte, err error)
- func (m *FullCopyLabel) MarshalTo(dAtA []byte) (int, error)
- func (m *FullCopyLabel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FullCopyLabel) ProtoMessage()
- func (m *FullCopyLabel) Reset()
- func (m *FullCopyLabel) Size() (n int)
- func (m *FullCopyLabel) String() string
- func (m *FullCopyLabel) Unmarshal(dAtA []byte) error
- func (m *FullCopyLabel) XXX_DiscardUnknown()
- func (m *FullCopyLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FullCopyLabel) XXX_Merge(src proto.Message)
- func (m *FullCopyLabel) XXX_Size() int
- func (m *FullCopyLabel) XXX_Unmarshal(b []byte) error
- type FullCopyLabelSet
- func (*FullCopyLabelSet) Descriptor() ([]byte, []int)
- func (m *FullCopyLabelSet) Marshal() (dAtA []byte, err error)
- func (m *FullCopyLabelSet) MarshalTo(dAtA []byte) (int, error)
- func (m *FullCopyLabelSet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FullCopyLabelSet) ProtoMessage()
- func (m *FullCopyLabelSet) Reset()
- func (m *FullCopyLabelSet) Size() (n int)
- func (m *FullCopyLabelSet) String() string
- func (m *FullCopyLabelSet) Unmarshal(dAtA []byte) error
- func (m *FullCopyLabelSet) XXX_DiscardUnknown()
- func (m *FullCopyLabelSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FullCopyLabelSet) XXX_Merge(src proto.Message)
- func (m *FullCopyLabelSet) XXX_Size() int
- func (m *FullCopyLabelSet) XXX_Unmarshal(b []byte) error
- type Label
- type LabelSet
- func (*LabelSet) Descriptor() ([]byte, []int)
- func (m *LabelSet) Marshal() (dAtA []byte, err error)
- func (m *LabelSet) MarshalJSON() ([]byte, error)
- func (m *LabelSet) MarshalTo(dAtA []byte) (int, error)
- func (m *LabelSet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *LabelSet) PromLabels() labels.Labels
- func (*LabelSet) ProtoMessage()
- func (m *LabelSet) Reset()
- func (m *LabelSet) Size() (n int)
- func (m *LabelSet) String() string
- func (m *LabelSet) Unmarshal(dAtA []byte) error
- func (m *LabelSet) UnmarshalJSON(entry []byte) error
- func (m *LabelSet) XXX_DiscardUnknown()
- func (m *LabelSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LabelSet) XXX_Merge(src proto.Message)
- func (m *LabelSet) XXX_Size() int
- func (m *LabelSet) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ExtendLabels ¶
ExtendLabels extend given labels by extend in labels format. The type conversion is done safely, which means we don't modify extend labels underlying array.
In case of existing labels already present in given label set, it will be overwritten by external one.
func LabelSetsToPromLabelSets ¶
LabelSetsToPromLabelSets converts slice of storepb.LabelSet to slice of Prometheus labels.
func LabelsToPromLabels ¶
LabelsToPromLabels convert slice of storepb.Label to Prometheus labels in type unsafe manner. It reuses the same memory. Caller should abort using passed []Label.
func PromLabelSetsToString ¶
Types ¶
type FullCopyLabel ¶
type FullCopyLabel struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*FullCopyLabel) Descriptor ¶
func (*FullCopyLabel) Descriptor() ([]byte, []int)
func (*FullCopyLabel) Marshal ¶
func (m *FullCopyLabel) Marshal() (dAtA []byte, err error)
func (*FullCopyLabel) MarshalToSizedBuffer ¶
func (m *FullCopyLabel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FullCopyLabel) ProtoMessage ¶
func (*FullCopyLabel) ProtoMessage()
func (*FullCopyLabel) Reset ¶
func (m *FullCopyLabel) Reset()
func (*FullCopyLabel) Size ¶
func (m *FullCopyLabel) Size() (n int)
func (*FullCopyLabel) String ¶
func (m *FullCopyLabel) String() string
func (*FullCopyLabel) Unmarshal ¶
func (m *FullCopyLabel) Unmarshal(dAtA []byte) error
func (*FullCopyLabel) XXX_DiscardUnknown ¶
func (m *FullCopyLabel) XXX_DiscardUnknown()
func (*FullCopyLabel) XXX_Marshal ¶
func (m *FullCopyLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FullCopyLabel) XXX_Merge ¶
func (m *FullCopyLabel) XXX_Merge(src proto.Message)
func (*FullCopyLabel) XXX_Size ¶
func (m *FullCopyLabel) XXX_Size() int
func (*FullCopyLabel) XXX_Unmarshal ¶
func (m *FullCopyLabel) XXX_Unmarshal(b []byte) error
type FullCopyLabelSet ¶
type FullCopyLabelSet struct {
Labels []FullCopyLabel `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels"`
}
func (*FullCopyLabelSet) Descriptor ¶
func (*FullCopyLabelSet) Descriptor() ([]byte, []int)
func (*FullCopyLabelSet) Marshal ¶
func (m *FullCopyLabelSet) Marshal() (dAtA []byte, err error)
func (*FullCopyLabelSet) MarshalToSizedBuffer ¶
func (m *FullCopyLabelSet) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FullCopyLabelSet) ProtoMessage ¶
func (*FullCopyLabelSet) ProtoMessage()
func (*FullCopyLabelSet) Reset ¶
func (m *FullCopyLabelSet) Reset()
func (*FullCopyLabelSet) Size ¶
func (m *FullCopyLabelSet) Size() (n int)
func (*FullCopyLabelSet) String ¶
func (m *FullCopyLabelSet) String() string
func (*FullCopyLabelSet) Unmarshal ¶
func (m *FullCopyLabelSet) Unmarshal(dAtA []byte) error
func (*FullCopyLabelSet) XXX_DiscardUnknown ¶
func (m *FullCopyLabelSet) XXX_DiscardUnknown()
func (*FullCopyLabelSet) XXX_Marshal ¶
func (m *FullCopyLabelSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FullCopyLabelSet) XXX_Merge ¶
func (m *FullCopyLabelSet) XXX_Merge(src proto.Message)
func (*FullCopyLabelSet) XXX_Size ¶
func (m *FullCopyLabelSet) XXX_Size() int
func (*FullCopyLabelSet) XXX_Unmarshal ¶
func (m *FullCopyLabelSet) XXX_Unmarshal(b []byte) error
type Label ¶
type Label = FullCopyLabel
Label is a FullCopyLabel. This is quick fix for https://github.com/thanos-io/thanos/issues/3265. TODO(bwplotka): Replace with https://github.com/thanos-io/thanos/pull/3279
func LabelsFromPromLabels ¶
LabelsFromPromLabels converts Prometheus labels to slice of storepb.Label in type unsafe manner. It reuses the same memory. Caller should abort using passed labels.Labels.
type LabelSet ¶
type LabelSet struct {
Labels []Label `protobuf:"bytes,1,rep,name=labels,proto3,customtype=Label" json:"labels"`
}
func (*LabelSet) Descriptor ¶
func (*LabelSet) MarshalJSON ¶
func (*LabelSet) MarshalToSizedBuffer ¶
func (*LabelSet) PromLabels ¶
PromLabels return Prometheus labels.Labels without extra allocation.
func (*LabelSet) ProtoMessage ¶
func (*LabelSet) ProtoMessage()
func (*LabelSet) UnmarshalJSON ¶
func (*LabelSet) XXX_DiscardUnknown ¶
func (m *LabelSet) XXX_DiscardUnknown()