Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package. It is generated from these files: pb/collector.proto pb/exporter.proto pb/metric.proto It has these top-level messages: MeteringReqResp
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCollectorServiceServer(s *grpc.Server, srv CollectorServiceServer)
- func RegisterExporterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterExporterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterExporterServiceServer(s *grpc.Server, srv ExporterServiceServer)
- type CollectorServiceClient
- type CollectorServiceServer
- type CollectorService_BatchTransitClient
- type CollectorService_BatchTransitServer
- type ExporterServiceClient
- type ExporterServiceServer
- type MeterDriver
- type MeteringReqResp
- func (*MeteringReqResp) Descriptor() ([]byte, []int)
- func (m *MeteringReqResp) GetMeterDriver() MeterDriver
- func (m *MeteringReqResp) GetMeterRequest() map[int32][]byte
- func (m *MeteringReqResp) GetMeterResponse() map[int32][]byte
- func (m *MeteringReqResp) GetMeterUrl() string
- func (m *MeteringReqResp) GetStateCode() int32
- func (m *MeteringReqResp) GetStateMessage() string
- func (m *MeteringReqResp) GetTimestampNanosec() int64
- func (m *MeteringReqResp) Marshal() (dAtA []byte, err error)
- func (m *MeteringReqResp) MarshalTo(dAtA []byte) (int, error)
- func (*MeteringReqResp) ProtoMessage()
- func (m *MeteringReqResp) Reset()
- func (m *MeteringReqResp) Size() (n int)
- func (m *MeteringReqResp) String() string
- func (m *MeteringReqResp) Unmarshal(dAtA []byte) error
- type MetricType
- type RequestType
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetric = fmt.Errorf("proto: integer overflow") )
var MeterDriver_name = map[int32]string{
0: "CADVISOR",
1: "DOCKER",
2: "HEAPSTER",
3: "PROMETHEUS",
}
var MeterDriver_value = map[string]int32{
"CADVISOR": 0,
"DOCKER": 1,
"HEAPSTER": 2,
"PROMETHEUS": 3,
}
var MetricType_name = map[int32]string{
0: "CADVISOR_V1_MACHINEINFO",
1: "CADVISOR_V1_CONTAINERINFO",
2: "CADVISOR_V1_EVENT",
3: "CADVISOR_V2_MACHINESTATS",
4: "CADVISOR_V2_ATTRIBUTES",
5: "CADVISOR_V2_CONTAINERINFO",
6: "CADVISOR_VERSION",
}
var MetricType_value = map[string]int32{
"CADVISOR_V1_MACHINEINFO": 0,
"CADVISOR_V1_CONTAINERINFO": 1,
"CADVISOR_V1_EVENT": 2,
"CADVISOR_V2_MACHINESTATS": 3,
"CADVISOR_V2_ATTRIBUTES": 4,
"CADVISOR_V2_CONTAINERINFO": 5,
"CADVISOR_VERSION": 6,
}
var RequestType_name = map[int32]string{
0: "CADVISOR_V1_MACHINEINFOREQUEST",
1: "CADVISOR_V1_ContainerInfoRequest",
2: "CADVISOR_V1_EVENTINFOREQUEST",
3: "CADVISOR_V2_MACHINESTATSREQUEST",
4: "CADVISOR_V2_ATTRIBUTESREQUEST",
5: "CADVISOR_V2_RequestOptions",
6: "CADVISOR_VERSIONINFOREQUEST",
}
var RequestType_value = map[string]int32{
"CADVISOR_V1_MACHINEINFOREQUEST": 0,
"CADVISOR_V1_ContainerInfoRequest": 1,
"CADVISOR_V1_EVENTINFOREQUEST": 2,
"CADVISOR_V2_MACHINESTATSREQUEST": 3,
"CADVISOR_V2_ATTRIBUTESREQUEST": 4,
"CADVISOR_V2_RequestOptions": 5,
"CADVISOR_VERSIONINFOREQUEST": 6,
}
Functions ¶
func RegisterCollectorServiceHandler ¶
func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCollectorServiceHandler registers the http handlers for service CollectorService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCollectorServiceHandlerFromEndpoint ¶
func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCollectorServiceHandlerFromEndpoint is same as RegisterCollectorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCollectorServiceServer ¶
func RegisterCollectorServiceServer(s *grpc.Server, srv CollectorServiceServer)
func RegisterExporterServiceHandler ¶
func RegisterExporterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterExporterServiceHandler registers the http handlers for service ExporterService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterExporterServiceHandlerFromEndpoint ¶
func RegisterExporterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterExporterServiceHandlerFromEndpoint is same as RegisterExporterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterExporterServiceServer ¶
func RegisterExporterServiceServer(s *grpc.Server, srv ExporterServiceServer)
Types ¶
type CollectorServiceClient ¶
type CollectorServiceClient interface { Transit(ctx context.Context, in *MeteringReqResp, opts ...grpc.CallOption) (*MeteringReqResp, error) BatchTransit(ctx context.Context, opts ...grpc.CallOption) (CollectorService_BatchTransitClient, error) }
func NewCollectorServiceClient ¶
func NewCollectorServiceClient(cc *grpc.ClientConn) CollectorServiceClient
type CollectorServiceServer ¶
type CollectorServiceServer interface { Transit(context.Context, *MeteringReqResp) (*MeteringReqResp, error) BatchTransit(CollectorService_BatchTransitServer) error }
type CollectorService_BatchTransitClient ¶
type CollectorService_BatchTransitClient interface { Send(*MeteringReqResp) error Recv() (*MeteringReqResp, error) grpc.ClientStream }
type CollectorService_BatchTransitServer ¶
type CollectorService_BatchTransitServer interface { Send(*MeteringReqResp) error Recv() (*MeteringReqResp, error) grpc.ServerStream }
type ExporterServiceClient ¶
type ExporterServiceClient interface {
Measure(ctx context.Context, in *MeteringReqResp, opts ...grpc.CallOption) (*MeteringReqResp, error)
}
func NewExporterServiceClient ¶
func NewExporterServiceClient(cc *grpc.ClientConn) ExporterServiceClient
type ExporterServiceServer ¶
type ExporterServiceServer interface {
Measure(context.Context, *MeteringReqResp) (*MeteringReqResp, error)
}
type MeterDriver ¶
type MeterDriver int32
const ( MeterDriver_CADVISOR MeterDriver = 0 MeterDriver_DOCKER MeterDriver = 1 MeterDriver_HEAPSTER MeterDriver = 2 MeterDriver_PROMETHEUS MeterDriver = 3 )
func (MeterDriver) EnumDescriptor ¶
func (MeterDriver) EnumDescriptor() ([]byte, []int)
func (MeterDriver) String ¶
func (x MeterDriver) String() string
type MeteringReqResp ¶
type MeteringReqResp struct { MeterDriver MeterDriver `protobuf:"varint,1,opt,name=meter_driver,json=meterDriver,proto3,enum=pb.MeterDriver" json:"meter_driver,omitempty"` MeterUrl string `protobuf:"bytes,2,opt,name=meter_url,json=meterUrl,proto3" json:"meter_url,omitempty"` MeterRequest map[int32][]byte `` /* 179-byte string literal not displayed */ TimestampNanosec int64 `protobuf:"varint,4,opt,name=timestamp_nanosec,json=timestampNanosec,proto3" json:"timestamp_nanosec,omitempty"` MeterResponse map[int32][]byte `` /* 182-byte string literal not displayed */ StateCode int32 `protobuf:"varint,6,opt,name=state_code,json=stateCode,proto3" json:"state_code,omitempty"` StateMessage string `protobuf:"bytes,7,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"` }
func (*MeteringReqResp) Descriptor ¶
func (*MeteringReqResp) Descriptor() ([]byte, []int)
func (*MeteringReqResp) GetMeterDriver ¶
func (m *MeteringReqResp) GetMeterDriver() MeterDriver
func (*MeteringReqResp) GetMeterRequest ¶
func (m *MeteringReqResp) GetMeterRequest() map[int32][]byte
func (*MeteringReqResp) GetMeterResponse ¶
func (m *MeteringReqResp) GetMeterResponse() map[int32][]byte
func (*MeteringReqResp) GetMeterUrl ¶
func (m *MeteringReqResp) GetMeterUrl() string
func (*MeteringReqResp) GetStateCode ¶
func (m *MeteringReqResp) GetStateCode() int32
func (*MeteringReqResp) GetStateMessage ¶
func (m *MeteringReqResp) GetStateMessage() string
func (*MeteringReqResp) GetTimestampNanosec ¶
func (m *MeteringReqResp) GetTimestampNanosec() int64
func (*MeteringReqResp) Marshal ¶
func (m *MeteringReqResp) Marshal() (dAtA []byte, err error)
func (*MeteringReqResp) ProtoMessage ¶
func (*MeteringReqResp) ProtoMessage()
func (*MeteringReqResp) Reset ¶
func (m *MeteringReqResp) Reset()
func (*MeteringReqResp) Size ¶
func (m *MeteringReqResp) Size() (n int)
func (*MeteringReqResp) String ¶
func (m *MeteringReqResp) String() string
func (*MeteringReqResp) Unmarshal ¶
func (m *MeteringReqResp) Unmarshal(dAtA []byte) error
type MetricType ¶
type MetricType int32
const ( MetricType_CADVISOR_V1_MACHINEINFO MetricType = 0 MetricType_CADVISOR_V1_CONTAINERINFO MetricType = 1 MetricType_CADVISOR_V1_EVENT MetricType = 2 MetricType_CADVISOR_V2_MACHINESTATS MetricType = 3 MetricType_CADVISOR_V2_ATTRIBUTES MetricType = 4 MetricType_CADVISOR_V2_CONTAINERINFO MetricType = 5 MetricType_CADVISOR_VERSION MetricType = 6 )
func (MetricType) EnumDescriptor ¶
func (MetricType) EnumDescriptor() ([]byte, []int)
func (MetricType) String ¶
func (x MetricType) String() string
type RequestType ¶
type RequestType int32
const ( RequestType_CADVISOR_V1_MACHINEINFOREQUEST RequestType = 0 RequestType_CADVISOR_V1_ContainerInfoRequest RequestType = 1 RequestType_CADVISOR_V1_EVENTINFOREQUEST RequestType = 2 RequestType_CADVISOR_V2_MACHINESTATSREQUEST RequestType = 3 RequestType_CADVISOR_V2_ATTRIBUTESREQUEST RequestType = 4 RequestType_CADVISOR_V2_RequestOptions RequestType = 5 RequestType_CADVISOR_VERSIONINFOREQUEST RequestType = 6 )
func (RequestType) EnumDescriptor ¶
func (RequestType) EnumDescriptor() ([]byte, []int)
func (RequestType) String ¶
func (x RequestType) String() string