Documentation ¶
Overview ¶
Package common is a generated protocol buffer package.
It is generated from these files:
github.com/intelsdi-x/snap/grpc/common/common.proto
It has these top-level messages:
Time Empty SnapError Label Metric NamespaceElement SubscribedPlugin ConfigMap Plugin
Index ¶
- func ConfigMapToConfig(cfg *ConfigMap) *cdata.ConfigDataNode
- func ConvertSnapErrors(s []*SnapError) []serror.SnapError
- func GetError(s *SnapError) string
- func GetFields(s *SnapError) map[string]interface{}
- func MetricToRequested(mts []*Metric) []core.RequestedMetric
- func MsgToCorePlugin(msg *Plugin) core.Plugin
- func MsgToCorePlugins(msg []*Plugin) []core.Plugin
- func ParseConfig(config *ConfigMap) map[string]ctypes.ConfigValue
- func ToCoreMetric(mt *Metric) core.Metric
- func ToCoreMetrics(mts []*Metric) []core.Metric
- func ToCoreNamespace(n []*NamespaceElement) core.Namespace
- func ToCorePlugin(pl core.SubscribedPlugin) core.Plugin
- func ToCorePlugins(pl []core.SubscribedPlugin) []core.Plugin
- func ToRequestedMetrics(mts []*Metric) []core.RequestedMetric
- func ToSnapError(e *SnapError) serror.SnapError
- func ToSubPlugin(msg *SubscribedPlugin) core.SubscribedPlugin
- func ToSubPlugins(msg []*SubscribedPlugin) []core.SubscribedPlugin
- type ConfigMap
- func (*ConfigMap) Descriptor() ([]byte, []int)
- func (m *ConfigMap) GetBoolMap() map[string]bool
- func (m *ConfigMap) GetFloatMap() map[string]float64
- func (m *ConfigMap) GetIntMap() map[string]int64
- func (m *ConfigMap) GetStringMap() map[string]string
- func (*ConfigMap) ProtoMessage()
- func (m *ConfigMap) Reset()
- func (m *ConfigMap) String() string
- type Empty
- type Label
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)
- func (m *Metric) GetBoolData() bool
- func (m *Metric) GetBytesData() []byte
- func (m *Metric) GetConfig() *ConfigMap
- func (m *Metric) GetData() isMetric_Data
- func (m *Metric) GetFloat32Data() float32
- func (m *Metric) GetFloat64Data() float64
- func (m *Metric) GetInt32Data() int32
- func (m *Metric) GetInt64Data() int64
- func (m *Metric) GetLastAdvertisedTime() *Time
- func (m *Metric) GetNamespace() []*NamespaceElement
- func (m *Metric) GetStringData() string
- func (m *Metric) GetTags() map[string]string
- func (m *Metric) GetTimestamp() *Time
- func (*Metric) ProtoMessage()
- func (m *Metric) Reset()
- func (m *Metric) String() string
- func (*Metric) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type Metric_BoolData
- type Metric_BytesData
- type Metric_Float32Data
- type Metric_Float64Data
- type Metric_Int32Data
- type Metric_Int64Data
- type Metric_StringData
- type NamespaceElement
- type Plugin
- type SnapError
- type SubPlugin
- type SubscribedPlugin
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapToConfig ¶
func ConfigMapToConfig(cfg *ConfigMap) *cdata.ConfigDataNode
Converts configMaps to ConfigDataNode
func ConvertSnapErrors ¶
Converts SnapError protobuf messages to serror.Snaperrors
func MetricToRequested ¶
func MetricToRequested(mts []*Metric) []core.RequestedMetric
func MsgToCorePlugin ¶
Converts Plugin protobuf message to core.Plugin
func MsgToCorePlugins ¶
Converts slice of plugin protobuf messages to core.Plugins
func ParseConfig ¶
func ParseConfig(config *ConfigMap) map[string]ctypes.ConfigValue
Parses a configMap to a map[string]ctypes.ConfigValue
func ToCoreMetrics ¶
Convert slice of common.Metric to []core.Metric
func ToCoreNamespace ¶
func ToCoreNamespace(n []*NamespaceElement) core.Namespace
Convert common.Namespace protobuf message to core.Namespace
func ToCorePlugin ¶
func ToCorePlugin(pl core.SubscribedPlugin) core.Plugin
Convert from core.SubscribedPlugin to core.Plugin
func ToCorePlugins ¶
func ToCorePlugins(pl []core.SubscribedPlugin) []core.Plugin
Convert from []core.SubscribedPlugin to []core.Plugin
func ToRequestedMetrics ¶
func ToRequestedMetrics(mts []*Metric) []core.RequestedMetric
Convert slice of common.Metric to []core.RequestedMetric
func ToSnapError ¶
Converts a single SnapError protobuf message to SnapError
func ToSubPlugin ¶
func ToSubPlugin(msg *SubscribedPlugin) core.SubscribedPlugin
Convert from a SubscribedPlugin protobuf message to core.SubscribedPlugin
func ToSubPlugins ¶
func ToSubPlugins(msg []*SubscribedPlugin) []core.SubscribedPlugin
Converts slice of SubscribedPlugin Messages to core.SubscribedPlugins
Types ¶
type ConfigMap ¶
type ConfigMap struct { IntMap map[string]int64 `` /* 145-byte string literal not displayed */ StringMap map[string]string `` /* 153-byte string literal not displayed */ // double is float64 FloatMap map[string]float64 `` /* 152-byte string literal not displayed */ BoolMap map[string]bool `` /* 148-byte string literal not displayed */ }
func ConfigToConfigMap ¶
func ConfigToConfigMap(cd *cdata.ConfigDataNode) *ConfigMap
Converts ConfigDataNode to ConfigMap protobuf message
func ToConfigMap ¶
func ToConfigMap(cv map[string]ctypes.ConfigValue) *ConfigMap
Converts ConfigDataNode to ConfigMap protobuf message
func (*ConfigMap) Descriptor ¶
func (*ConfigMap) GetBoolMap ¶
func (*ConfigMap) GetFloatMap ¶
func (*ConfigMap) GetStringMap ¶
func (*ConfigMap) ProtoMessage ¶
func (*ConfigMap) ProtoMessage()
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type Label ¶
type Label struct { Index uint64 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` }
func (*Label) Descriptor ¶
func (*Label) ProtoMessage ¶
func (*Label) ProtoMessage()
type Metric ¶
type Metric struct { Namespace []*NamespaceElement `protobuf:"bytes,1,rep,name=Namespace,json=namespace" json:"Namespace,omitempty"` Version int64 `protobuf:"varint,2,opt,name=Version,json=version" json:"Version,omitempty"` Config *ConfigMap `protobuf:"bytes,3,opt,name=Config,json=config" json:"Config,omitempty"` LastAdvertisedTime *Time `protobuf:"bytes,4,opt,name=LastAdvertisedTime,json=lastAdvertisedTime" json:"LastAdvertisedTime,omitempty"` Tags map[string]string `` /* 138-byte string literal not displayed */ Timestamp *Time `protobuf:"bytes,6,opt,name=Timestamp,json=timestamp" json:"Timestamp,omitempty"` Unit string `protobuf:"bytes,7,opt,name=Unit,json=unit" json:"Unit,omitempty"` Description string `protobuf:"bytes,8,opt,name=Description,json=description" json:"Description,omitempty"` // Types that are valid to be assigned to Data: // *Metric_StringData // *Metric_Float32Data // *Metric_Float64Data // *Metric_Int32Data // *Metric_Int64Data // *Metric_BytesData // *Metric_BoolData Data isMetric_Data `protobuf_oneof:"data"` }
core.Metric
func NewMetrics ¶
Convert a slice of core.Metrics to []*common.Metric protobuf messages
func RequestedToMetric ¶
func RequestedToMetric(requested []core.RequestedMetric) []*Metric
func (*Metric) Descriptor ¶
func (*Metric) GetBoolData ¶
func (*Metric) GetBytesData ¶
func (*Metric) GetFloat32Data ¶
func (*Metric) GetFloat64Data ¶
func (*Metric) GetInt32Data ¶
func (*Metric) GetInt64Data ¶
func (*Metric) GetLastAdvertisedTime ¶
func (*Metric) GetNamespace ¶
func (m *Metric) GetNamespace() []*NamespaceElement
func (*Metric) GetStringData ¶
func (*Metric) GetTimestamp ¶
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
type Metric_BoolData ¶
type Metric_BoolData struct {
BoolData bool `protobuf:"varint,15,opt,name=bool_data,json=boolData,oneof"`
}
type Metric_BytesData ¶
type Metric_BytesData struct {
BytesData []byte `protobuf:"bytes,14,opt,name=bytes_data,json=bytesData,proto3,oneof"`
}
type Metric_Float32Data ¶
type Metric_Float32Data struct {
Float32Data float32 `protobuf:"fixed32,10,opt,name=float32_data,json=float32Data,oneof"`
}
type Metric_Float64Data ¶
type Metric_Float64Data struct {
Float64Data float64 `protobuf:"fixed64,11,opt,name=float64_data,json=float64Data,oneof"`
}
type Metric_Int32Data ¶
type Metric_Int32Data struct {
Int32Data int32 `protobuf:"varint,12,opt,name=int32_data,json=int32Data,oneof"`
}
type Metric_Int64Data ¶
type Metric_Int64Data struct {
Int64Data int64 `protobuf:"varint,13,opt,name=int64_data,json=int64Data,oneof"`
}
type Metric_StringData ¶
type Metric_StringData struct {
StringData string `protobuf:"bytes,9,opt,name=string_data,json=stringData,oneof"`
}
type NamespaceElement ¶
type NamespaceElement struct { Value string `protobuf:"bytes,1,opt,name=Value,json=value" json:"Value,omitempty"` Description string `protobuf:"bytes,2,opt,name=Description,json=description" json:"Description,omitempty"` Name string `protobuf:"bytes,3,opt,name=Name,json=name" json:"Name,omitempty"` }
func ToNamespace ¶
func ToNamespace(n core.Namespace) []*NamespaceElement
Convert core.Namespace to common.Namespace protobuf message
func (*NamespaceElement) Descriptor ¶
func (*NamespaceElement) Descriptor() ([]byte, []int)
func (*NamespaceElement) ProtoMessage ¶
func (*NamespaceElement) ProtoMessage()
func (*NamespaceElement) Reset ¶
func (m *NamespaceElement) Reset()
func (*NamespaceElement) String ¶
func (m *NamespaceElement) String() string
type Plugin ¶
type Plugin struct { TypeName string `protobuf:"bytes,1,opt,name=TypeName,json=typeName" json:"TypeName,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,json=name" json:"Name,omitempty"` Version int64 `protobuf:"varint,3,opt,name=Version,json=version" json:"Version,omitempty"` }
core.Plugin
func ToCorePluginMsg ¶
Convert from core.Plugin to Plugin protobuf message
func ToCorePluginsMsg ¶
Convert from Plugin protobuf message to core.Plugin
func (*Plugin) Descriptor ¶
func (*Plugin) ProtoMessage ¶
func (*Plugin) ProtoMessage()
type SnapError ¶
type SnapError struct { ErrorString string `protobuf:"bytes,1,opt,name=error_string,json=errorString" json:"error_string,omitempty"` ErrorFields map[string]string `` /* 161-byte string literal not displayed */ }
func (*SnapError) Descriptor ¶
func (*SnapError) GetErrorFields ¶
func (*SnapError) ProtoMessage ¶
func (*SnapError) ProtoMessage()
type SubPlugin ¶
type SubPlugin struct {
// contains filtered or unexported fields
}
implements core.SubscribedPlugin
func (SubPlugin) Config ¶
func (sp SubPlugin) Config() *cdata.ConfigDataNode
type SubscribedPlugin ¶
type SubscribedPlugin struct { TypeName string `protobuf:"bytes,1,opt,name=TypeName,json=typeName" json:"TypeName,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,json=name" json:"Name,omitempty"` Version int64 `protobuf:"varint,3,opt,name=Version,json=version" json:"Version,omitempty"` Config *ConfigMap `protobuf:"bytes,4,opt,name=Config,json=config" json:"Config,omitempty"` }
core.SubscribedPlugin
func ToSubPluginMsg ¶
func ToSubPluginMsg(pl core.SubscribedPlugin) *SubscribedPlugin
Convert core.SubscribedPlugin to SubscribedPlugin protobuf message
func ToSubPluginsMsg ¶
func ToSubPluginsMsg(sp []core.SubscribedPlugin) []*SubscribedPlugin
Converts core.SubscribedPlugins to protobuf messages
func (*SubscribedPlugin) Descriptor ¶
func (*SubscribedPlugin) Descriptor() ([]byte, []int)
func (*SubscribedPlugin) GetConfig ¶
func (m *SubscribedPlugin) GetConfig() *ConfigMap
func (*SubscribedPlugin) ProtoMessage ¶
func (*SubscribedPlugin) ProtoMessage()
func (*SubscribedPlugin) Reset ¶
func (m *SubscribedPlugin) Reset()
func (*SubscribedPlugin) String ¶
func (m *SubscribedPlugin) String() string
type Time ¶
type Time struct { Sec int64 `protobuf:"varint,1,opt,name=sec" json:"sec,omitempty"` Nsec int64 `protobuf:"varint,2,opt,name=nsec" json:"nsec,omitempty"` }
func (*Time) Descriptor ¶
func (*Time) ProtoMessage ¶
func (*Time) ProtoMessage()