rpc

package
v0.16.1-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 9 Imported by: 16

Documentation

Overview

Package rpc is a generated protocol buffer package.

It is generated from these files:

github.com/intelsdi-x/snap/control/plugin/rpc/plugin.proto

It has these top-level messages:

Empty
ErrReply
Time
NamespaceElement
PubProcArg
Metric
ConfigMap
KillArg
GetConfigPolicyReply
BoolRule
BoolPolicy
FloatRule
FloatPolicy
IntegerRule
IntegerPolicy
StringRule
StringPolicy
MetricsArg
MetricsReply
GetMetricTypesArg

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCollectorServer

func RegisterCollectorServer(s *grpc.Server, srv CollectorServer)

func RegisterProcessorServer

func RegisterProcessorServer(s *grpc.Server, srv ProcessorServer)

func RegisterPublisherServer

func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)

func ToConfigPolicy

func ToConfigPolicy(reply *GetConfigPolicyReply) *cpolicy.ConfigPolicy

Types

type BoolPolicy

type BoolPolicy struct {
	Rules map[string]*BoolRule `` /* 130-byte string literal not displayed */
}

func (*BoolPolicy) Descriptor

func (*BoolPolicy) Descriptor() ([]byte, []int)

func (*BoolPolicy) GetRules

func (m *BoolPolicy) GetRules() map[string]*BoolRule

func (*BoolPolicy) ProtoMessage

func (*BoolPolicy) ProtoMessage()

func (*BoolPolicy) Reset

func (m *BoolPolicy) Reset()

func (*BoolPolicy) String

func (m *BoolPolicy) String() string

type BoolRule

type BoolRule struct {
	Required   bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
	Default    bool `protobuf:"varint,2,opt,name=default" json:"default,omitempty"`
	HasDefault bool `protobuf:"varint,3,opt,name=has_default,json=hasDefault" json:"has_default,omitempty"`
}

func (*BoolRule) Descriptor

func (*BoolRule) Descriptor() ([]byte, []int)

func (*BoolRule) ProtoMessage

func (*BoolRule) ProtoMessage()

func (*BoolRule) Reset

func (m *BoolRule) Reset()

func (*BoolRule) String

func (m *BoolRule) String() string

type CollectorClient

type CollectorClient interface {
	CollectMetrics(ctx context.Context, in *MetricsArg, opts ...grpc.CallOption) (*MetricsReply, error)
	GetMetricTypes(ctx context.Context, in *GetMetricTypesArg, opts ...grpc.CallOption) (*MetricsReply, error)
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrReply, error)
	Kill(ctx context.Context, in *KillArg, opts ...grpc.CallOption) (*ErrReply, error)
	GetConfigPolicy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetConfigPolicyReply, error)
}

func NewCollectorClient

func NewCollectorClient(cc *grpc.ClientConn) CollectorClient

type CollectorServer

type CollectorServer interface {
	CollectMetrics(context.Context, *MetricsArg) (*MetricsReply, error)
	GetMetricTypes(context.Context, *GetMetricTypesArg) (*MetricsReply, error)
	Ping(context.Context, *Empty) (*ErrReply, error)
	Kill(context.Context, *KillArg) (*ErrReply, error)
	GetConfigPolicy(context.Context, *Empty) (*GetConfigPolicyReply, error)
}

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 (*ConfigMap) Descriptor

func (*ConfigMap) Descriptor() ([]byte, []int)

func (*ConfigMap) GetBoolMap

func (m *ConfigMap) GetBoolMap() map[string]bool

func (*ConfigMap) GetFloatMap

func (m *ConfigMap) GetFloatMap() map[string]float64

func (*ConfigMap) GetIntMap

func (m *ConfigMap) GetIntMap() map[string]int64

func (*ConfigMap) GetStringMap

func (m *ConfigMap) GetStringMap() map[string]string

func (*ConfigMap) ProtoMessage

func (*ConfigMap) ProtoMessage()

func (*ConfigMap) Reset

func (m *ConfigMap) Reset()

func (*ConfigMap) String

func (m *ConfigMap) String() string

type Empty

type Empty struct {
}

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type ErrReply

type ErrReply struct {
	Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}

func (*ErrReply) Descriptor

func (*ErrReply) Descriptor() ([]byte, []int)

func (*ErrReply) ProtoMessage

func (*ErrReply) ProtoMessage()

func (*ErrReply) Reset

func (m *ErrReply) Reset()

func (*ErrReply) String

func (m *ErrReply) String() string

type FloatPolicy

type FloatPolicy struct {
	Rules map[string]*FloatRule `` /* 130-byte string literal not displayed */
}

func (*FloatPolicy) Descriptor

func (*FloatPolicy) Descriptor() ([]byte, []int)

func (*FloatPolicy) GetRules

func (m *FloatPolicy) GetRules() map[string]*FloatRule

func (*FloatPolicy) ProtoMessage

func (*FloatPolicy) ProtoMessage()

func (*FloatPolicy) Reset

func (m *FloatPolicy) Reset()

func (*FloatPolicy) String

func (m *FloatPolicy) String() string

type FloatRule

type FloatRule struct {
	Required   bool    `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
	Minimum    float64 `protobuf:"fixed64,2,opt,name=minimum" json:"minimum,omitempty"`
	Maximum    float64 `protobuf:"fixed64,3,opt,name=maximum" json:"maximum,omitempty"`
	Default    float64 `protobuf:"fixed64,4,opt,name=default" json:"default,omitempty"`
	HasDefault bool    `protobuf:"varint,5,opt,name=has_default,json=hasDefault" json:"has_default,omitempty"`
	HasMin     bool    `protobuf:"varint,6,opt,name=has_min,json=hasMin" json:"has_min,omitempty"`
	HasMax     bool    `protobuf:"varint,7,opt,name=has_max,json=hasMax" json:"has_max,omitempty"`
}

func (*FloatRule) Descriptor

func (*FloatRule) Descriptor() ([]byte, []int)

func (*FloatRule) ProtoMessage

func (*FloatRule) ProtoMessage()

func (*FloatRule) Reset

func (m *FloatRule) Reset()

func (*FloatRule) String

func (m *FloatRule) String() string

type GetConfigPolicyReply

type GetConfigPolicyReply struct {
	Error         string                    `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	BoolPolicy    map[string]*BoolPolicy    `` /* 158-byte string literal not displayed */
	FloatPolicy   map[string]*FloatPolicy   `` /* 161-byte string literal not displayed */
	IntegerPolicy map[string]*IntegerPolicy `` /* 167-byte string literal not displayed */
	StringPolicy  map[string]*StringPolicy  `` /* 164-byte string literal not displayed */
}

func NewGetConfigPolicyReply

func NewGetConfigPolicyReply(policy *cpolicy.ConfigPolicy) (*GetConfigPolicyReply, error)

NewGetConfigPolicyReply given a config *cpolicy.ConfigPolicy returns a GetConfigPolicyReply.

func (*GetConfigPolicyReply) Descriptor

func (*GetConfigPolicyReply) Descriptor() ([]byte, []int)

func (*GetConfigPolicyReply) GetBoolPolicy

func (m *GetConfigPolicyReply) GetBoolPolicy() map[string]*BoolPolicy

func (*GetConfigPolicyReply) GetFloatPolicy

func (m *GetConfigPolicyReply) GetFloatPolicy() map[string]*FloatPolicy

func (*GetConfigPolicyReply) GetIntegerPolicy

func (m *GetConfigPolicyReply) GetIntegerPolicy() map[string]*IntegerPolicy

func (*GetConfigPolicyReply) GetStringPolicy

func (m *GetConfigPolicyReply) GetStringPolicy() map[string]*StringPolicy

func (*GetConfigPolicyReply) ProtoMessage

func (*GetConfigPolicyReply) ProtoMessage()

func (*GetConfigPolicyReply) Reset

func (m *GetConfigPolicyReply) Reset()

func (*GetConfigPolicyReply) String

func (m *GetConfigPolicyReply) String() string

type GetMetricTypesArg

type GetMetricTypesArg struct {
	Config *ConfigMap `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
}

func (*GetMetricTypesArg) Descriptor

func (*GetMetricTypesArg) Descriptor() ([]byte, []int)

func (*GetMetricTypesArg) GetConfig

func (m *GetMetricTypesArg) GetConfig() *ConfigMap

func (*GetMetricTypesArg) ProtoMessage

func (*GetMetricTypesArg) ProtoMessage()

func (*GetMetricTypesArg) Reset

func (m *GetMetricTypesArg) Reset()

func (*GetMetricTypesArg) String

func (m *GetMetricTypesArg) String() string

type IntegerPolicy

type IntegerPolicy struct {
	Rules map[string]*IntegerRule `` /* 130-byte string literal not displayed */
}

func (*IntegerPolicy) Descriptor

func (*IntegerPolicy) Descriptor() ([]byte, []int)

func (*IntegerPolicy) GetRules

func (m *IntegerPolicy) GetRules() map[string]*IntegerRule

func (*IntegerPolicy) ProtoMessage

func (*IntegerPolicy) ProtoMessage()

func (*IntegerPolicy) Reset

func (m *IntegerPolicy) Reset()

func (*IntegerPolicy) String

func (m *IntegerPolicy) String() string

type IntegerRule

type IntegerRule struct {
	Required   bool  `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
	Minimum    int64 `protobuf:"varint,2,opt,name=minimum" json:"minimum,omitempty"`
	Maximum    int64 `protobuf:"varint,3,opt,name=maximum" json:"maximum,omitempty"`
	Default    int64 `protobuf:"varint,4,opt,name=default" json:"default,omitempty"`
	HasDefault bool  `protobuf:"varint,5,opt,name=has_default,json=hasDefault" json:"has_default,omitempty"`
	HasMin     bool  `protobuf:"varint,6,opt,name=has_min,json=hasMin" json:"has_min,omitempty"`
	HasMax     bool  `protobuf:"varint,7,opt,name=has_max,json=hasMax" json:"has_max,omitempty"`
}

func (*IntegerRule) Descriptor

func (*IntegerRule) Descriptor() ([]byte, []int)

func (*IntegerRule) ProtoMessage

func (*IntegerRule) ProtoMessage()

func (*IntegerRule) Reset

func (m *IntegerRule) Reset()

func (*IntegerRule) String

func (m *IntegerRule) String() string

type KillArg

type KillArg struct {
	Reason string `protobuf:"bytes,1,opt,name=Reason,json=reason" json:"Reason,omitempty"`
}

func (*KillArg) Descriptor

func (*KillArg) Descriptor() ([]byte, []int)

func (*KillArg) ProtoMessage

func (*KillArg) ProtoMessage()

func (*KillArg) Reset

func (m *KillArg) Reset()

func (*KillArg) String

func (m *KillArg) String() string

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 (*Metric) Descriptor

func (*Metric) Descriptor() ([]byte, []int)

func (*Metric) GetBoolData

func (m *Metric) GetBoolData() bool

func (*Metric) GetBytesData

func (m *Metric) GetBytesData() []byte

func (*Metric) GetConfig

func (m *Metric) GetConfig() *ConfigMap

func (*Metric) GetData

func (m *Metric) GetData() isMetric_Data

func (*Metric) GetFloat32Data

func (m *Metric) GetFloat32Data() float32

func (*Metric) GetFloat64Data

func (m *Metric) GetFloat64Data() float64

func (*Metric) GetInt32Data

func (m *Metric) GetInt32Data() int32

func (*Metric) GetInt64Data

func (m *Metric) GetInt64Data() int64

func (*Metric) GetLastAdvertisedTime

func (m *Metric) GetLastAdvertisedTime() *Time

func (*Metric) GetNamespace

func (m *Metric) GetNamespace() []*NamespaceElement

func (*Metric) GetStringData

func (m *Metric) GetStringData() string

func (*Metric) GetTags

func (m *Metric) GetTags() map[string]string

func (*Metric) GetTimestamp

func (m *Metric) GetTimestamp() *Time

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) Reset

func (m *Metric) Reset()

func (*Metric) String

func (m *Metric) String() string

func (*Metric) XXX_OneofFuncs

func (*Metric) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

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 MetricsArg

type MetricsArg struct {
	Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
}

func (*MetricsArg) Descriptor

func (*MetricsArg) Descriptor() ([]byte, []int)

func (*MetricsArg) GetMetrics

func (m *MetricsArg) GetMetrics() []*Metric

func (*MetricsArg) ProtoMessage

func (*MetricsArg) ProtoMessage()

func (*MetricsArg) Reset

func (m *MetricsArg) Reset()

func (*MetricsArg) String

func (m *MetricsArg) String() string

type MetricsReply

type MetricsReply struct {
	Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
	Error   string    `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
}

func (*MetricsReply) Descriptor

func (*MetricsReply) Descriptor() ([]byte, []int)

func (*MetricsReply) GetMetrics

func (m *MetricsReply) GetMetrics() []*Metric

func (*MetricsReply) ProtoMessage

func (*MetricsReply) ProtoMessage()

func (*MetricsReply) Reset

func (m *MetricsReply) Reset()

func (*MetricsReply) String

func (m *MetricsReply) String() string

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 (*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 ProcessorClient

type ProcessorClient interface {
	Process(ctx context.Context, in *PubProcArg, opts ...grpc.CallOption) (*MetricsReply, error)
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrReply, error)
	Kill(ctx context.Context, in *KillArg, opts ...grpc.CallOption) (*ErrReply, error)
	GetConfigPolicy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetConfigPolicyReply, error)
}

func NewProcessorClient

func NewProcessorClient(cc *grpc.ClientConn) ProcessorClient

type ProcessorServer

type ProcessorServer interface {
	Process(context.Context, *PubProcArg) (*MetricsReply, error)
	Ping(context.Context, *Empty) (*ErrReply, error)
	Kill(context.Context, *KillArg) (*ErrReply, error)
	GetConfigPolicy(context.Context, *Empty) (*GetConfigPolicyReply, error)
}

type PubProcArg

type PubProcArg struct {
	Metrics []*Metric  `protobuf:"bytes,1,rep,name=Metrics,json=metrics" json:"Metrics,omitempty"`
	Config  *ConfigMap `protobuf:"bytes,2,opt,name=Config,json=config" json:"Config,omitempty"`
}

func (*PubProcArg) Descriptor

func (*PubProcArg) Descriptor() ([]byte, []int)

func (*PubProcArg) GetConfig

func (m *PubProcArg) GetConfig() *ConfigMap

func (*PubProcArg) GetMetrics

func (m *PubProcArg) GetMetrics() []*Metric

func (*PubProcArg) ProtoMessage

func (*PubProcArg) ProtoMessage()

func (*PubProcArg) Reset

func (m *PubProcArg) Reset()

func (*PubProcArg) String

func (m *PubProcArg) String() string

type PublisherClient

type PublisherClient interface {
	Publish(ctx context.Context, in *PubProcArg, opts ...grpc.CallOption) (*ErrReply, error)
	Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrReply, error)
	Kill(ctx context.Context, in *KillArg, opts ...grpc.CallOption) (*ErrReply, error)
	GetConfigPolicy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetConfigPolicyReply, error)
}

func NewPublisherClient

func NewPublisherClient(cc *grpc.ClientConn) PublisherClient

type PublisherServer

type PublisherServer interface {
	Publish(context.Context, *PubProcArg) (*ErrReply, error)
	Ping(context.Context, *Empty) (*ErrReply, error)
	Kill(context.Context, *KillArg) (*ErrReply, error)
	GetConfigPolicy(context.Context, *Empty) (*GetConfigPolicyReply, error)
}

type StringPolicy

type StringPolicy struct {
	Rules map[string]*StringRule `` /* 130-byte string literal not displayed */
}

func (*StringPolicy) Descriptor

func (*StringPolicy) Descriptor() ([]byte, []int)

func (*StringPolicy) GetRules

func (m *StringPolicy) GetRules() map[string]*StringRule

func (*StringPolicy) ProtoMessage

func (*StringPolicy) ProtoMessage()

func (*StringPolicy) Reset

func (m *StringPolicy) Reset()

func (*StringPolicy) String

func (m *StringPolicy) String() string

type StringRule

type StringRule struct {
	Required   bool   `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
	Default    string `protobuf:"bytes,2,opt,name=default" json:"default,omitempty"`
	HasDefault bool   `protobuf:"varint,3,opt,name=has_default,json=hasDefault" json:"has_default,omitempty"`
}

func (*StringRule) Descriptor

func (*StringRule) Descriptor() ([]byte, []int)

func (*StringRule) ProtoMessage

func (*StringRule) ProtoMessage()

func (*StringRule) Reset

func (m *StringRule) Reset()

func (*StringRule) String

func (m *StringRule) 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) Descriptor() ([]byte, []int)

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

func (*Time) Reset

func (m *Time) Reset()

func (*Time) String

func (m *Time) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL