Documentation
¶
Overview ¶
Package evntsrc_stsmetrics is a generated protocol buffer package. It is generated from these files: metrics.proto It has these top-level messages: MetricCount MetricsRequest MetricsResponse
Package evntsrc_stsmetrics is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMetricsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMetricsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsServiceClient) error
- func RegisterMetricsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer)
- type Interval
- type MetricCount
- func (*MetricCount) Descriptor() ([]byte, []int)
- func (m *MetricCount) GetCount() float32
- func (m *MetricCount) GetTimestamp() *MetricCount_Timestamp
- func (m *MetricCount) Marshal() (dAtA []byte, err error)
- func (m *MetricCount) MarshalTo(dAtA []byte) (int, error)
- func (*MetricCount) ProtoMessage()
- func (m *MetricCount) Reset()
- func (m *MetricCount) Size() (n int)
- func (m *MetricCount) String() string
- func (m *MetricCount) Unmarshal(dAtA []byte) error
- func (*MetricCount) XXX_MessageName() string
- type MetricCount_Timestamp
- func (*MetricCount_Timestamp) Descriptor() ([]byte, []int)
- func (m *MetricCount_Timestamp) GetNanos() int32
- func (m *MetricCount_Timestamp) GetSeconds() int64
- func (m *MetricCount_Timestamp) Marshal() (dAtA []byte, err error)
- func (m *MetricCount_Timestamp) MarshalTo(dAtA []byte) (int, error)
- func (*MetricCount_Timestamp) ProtoMessage()
- func (m *MetricCount_Timestamp) Reset()
- func (m *MetricCount_Timestamp) Size() (n int)
- func (m *MetricCount_Timestamp) String() string
- func (m *MetricCount_Timestamp) Unmarshal(dAtA []byte) error
- func (*MetricCount_Timestamp) XXX_MessageName() string
- type MetricsRequest
- func (*MetricsRequest) Descriptor() ([]byte, []int)
- func (m *MetricsRequest) GetInterval() Interval
- func (m *MetricsRequest) GetStream() int32
- func (m *MetricsRequest) Marshal() (dAtA []byte, err error)
- func (m *MetricsRequest) MarshalTo(dAtA []byte) (int, error)
- func (*MetricsRequest) ProtoMessage()
- func (m *MetricsRequest) Reset()
- func (m *MetricsRequest) Size() (n int)
- func (m *MetricsRequest) String() string
- func (m *MetricsRequest) Unmarshal(dAtA []byte) error
- func (*MetricsRequest) XXX_MessageName() string
- type MetricsResponse
- func (*MetricsResponse) Descriptor() ([]byte, []int)
- func (m *MetricsResponse) GetMetrics() []*MetricCount
- func (m *MetricsResponse) Marshal() (dAtA []byte, err error)
- func (m *MetricsResponse) MarshalTo(dAtA []byte) (int, error)
- func (*MetricsResponse) ProtoMessage()
- func (m *MetricsResponse) Reset()
- func (m *MetricsResponse) Size() (n int)
- func (m *MetricsResponse) String() string
- func (m *MetricsResponse) Unmarshal(dAtA []byte) error
- func (*MetricsResponse) XXX_MessageName() string
- type MetricsServiceClient
- type MetricsServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") )
var Interval_name = map[int32]string{
0: "min10",
1: "min30",
2: "hour",
3: "hour12",
4: "day",
5: "week",
6: "month",
}
var Interval_value = map[string]int32{
"min10": 0,
"min30": 1,
"hour": 2,
"hour12": 3,
"day": 4,
"week": 5,
"month": 6,
}
Functions ¶
func RegisterMetricsServiceHandler ¶
func RegisterMetricsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMetricsServiceHandler registers the http handlers for service MetricsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMetricsServiceHandlerClient ¶
func RegisterMetricsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsServiceClient) error
RegisterMetricsServiceHandlerClient registers the http handlers for service MetricsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetricsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetricsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MetricsServiceClient" to call the correct interceptors.
func RegisterMetricsServiceHandlerFromEndpoint ¶
func RegisterMetricsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMetricsServiceHandlerFromEndpoint is same as RegisterMetricsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMetricsServiceServer ¶
func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer)
Types ¶
type MetricCount ¶
type MetricCount struct { Count float32 `protobuf:"fixed32,1,opt,name=count,proto3" json:"count,omitempty"` Timestamp *MetricCount_Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` }
func (*MetricCount) Descriptor ¶
func (*MetricCount) Descriptor() ([]byte, []int)
func (*MetricCount) GetCount ¶
func (m *MetricCount) GetCount() float32
func (*MetricCount) GetTimestamp ¶
func (m *MetricCount) GetTimestamp() *MetricCount_Timestamp
func (*MetricCount) Marshal ¶
func (m *MetricCount) Marshal() (dAtA []byte, err error)
func (*MetricCount) ProtoMessage ¶
func (*MetricCount) ProtoMessage()
func (*MetricCount) Reset ¶
func (m *MetricCount) Reset()
func (*MetricCount) Size ¶
func (m *MetricCount) Size() (n int)
func (*MetricCount) String ¶
func (m *MetricCount) String() string
func (*MetricCount) Unmarshal ¶
func (m *MetricCount) Unmarshal(dAtA []byte) error
func (*MetricCount) XXX_MessageName ¶
func (*MetricCount) XXX_MessageName() string
type MetricCount_Timestamp ¶
type MetricCount_Timestamp struct { Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` }
func (*MetricCount_Timestamp) Descriptor ¶
func (*MetricCount_Timestamp) Descriptor() ([]byte, []int)
func (*MetricCount_Timestamp) GetNanos ¶
func (m *MetricCount_Timestamp) GetNanos() int32
func (*MetricCount_Timestamp) GetSeconds ¶
func (m *MetricCount_Timestamp) GetSeconds() int64
func (*MetricCount_Timestamp) Marshal ¶
func (m *MetricCount_Timestamp) Marshal() (dAtA []byte, err error)
func (*MetricCount_Timestamp) MarshalTo ¶
func (m *MetricCount_Timestamp) MarshalTo(dAtA []byte) (int, error)
func (*MetricCount_Timestamp) ProtoMessage ¶
func (*MetricCount_Timestamp) ProtoMessage()
func (*MetricCount_Timestamp) Reset ¶
func (m *MetricCount_Timestamp) Reset()
func (*MetricCount_Timestamp) Size ¶
func (m *MetricCount_Timestamp) Size() (n int)
func (*MetricCount_Timestamp) String ¶
func (m *MetricCount_Timestamp) String() string
func (*MetricCount_Timestamp) Unmarshal ¶
func (m *MetricCount_Timestamp) Unmarshal(dAtA []byte) error
func (*MetricCount_Timestamp) XXX_MessageName ¶
func (*MetricCount_Timestamp) XXX_MessageName() string
type MetricsRequest ¶
type MetricsRequest struct { Stream int32 `protobuf:"varint,1,opt,name=stream,proto3" json:"stream,omitempty"` Interval Interval `protobuf:"varint,2,opt,name=interval,proto3,enum=evntsrc.stsmetrics.Interval" json:"interval,omitempty"` }
func (*MetricsRequest) Descriptor ¶
func (*MetricsRequest) Descriptor() ([]byte, []int)
func (*MetricsRequest) GetInterval ¶
func (m *MetricsRequest) GetInterval() Interval
func (*MetricsRequest) GetStream ¶
func (m *MetricsRequest) GetStream() int32
func (*MetricsRequest) Marshal ¶
func (m *MetricsRequest) Marshal() (dAtA []byte, err error)
func (*MetricsRequest) ProtoMessage ¶
func (*MetricsRequest) ProtoMessage()
func (*MetricsRequest) Reset ¶
func (m *MetricsRequest) Reset()
func (*MetricsRequest) Size ¶
func (m *MetricsRequest) Size() (n int)
func (*MetricsRequest) String ¶
func (m *MetricsRequest) String() string
func (*MetricsRequest) Unmarshal ¶
func (m *MetricsRequest) Unmarshal(dAtA []byte) error
func (*MetricsRequest) XXX_MessageName ¶
func (*MetricsRequest) XXX_MessageName() string
type MetricsResponse ¶
type MetricsResponse struct {
Metrics []*MetricCount `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
}
func (*MetricsResponse) Descriptor ¶
func (*MetricsResponse) Descriptor() ([]byte, []int)
func (*MetricsResponse) GetMetrics ¶
func (m *MetricsResponse) GetMetrics() []*MetricCount
func (*MetricsResponse) Marshal ¶
func (m *MetricsResponse) Marshal() (dAtA []byte, err error)
func (*MetricsResponse) ProtoMessage ¶
func (*MetricsResponse) ProtoMessage()
func (*MetricsResponse) Reset ¶
func (m *MetricsResponse) Reset()
func (*MetricsResponse) Size ¶
func (m *MetricsResponse) Size() (n int)
func (*MetricsResponse) String ¶
func (m *MetricsResponse) String() string
func (*MetricsResponse) Unmarshal ¶
func (m *MetricsResponse) Unmarshal(dAtA []byte) error
func (*MetricsResponse) XXX_MessageName ¶
func (*MetricsResponse) XXX_MessageName() string
type MetricsServiceClient ¶
type MetricsServiceClient interface { EventsCount(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) EventsSize(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) Connections(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) }
func NewMetricsServiceClient ¶
func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient
type MetricsServiceServer ¶
type MetricsServiceServer interface { EventsCount(context.Context, *MetricsRequest) (*MetricsResponse, error) EventsSize(context.Context, *MetricsRequest) (*MetricsResponse, error) Connections(context.Context, *MetricsRequest) (*MetricsResponse, error) }