grpc

package
v0.0.0-...-31263be Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

* * Generated by go-doudou v2.0.4. * Don't edit!

Index

Constants

This section is empty.

Variables

View Source
var File_transport_grpc_prom_proto protoreflect.FileDescriptor
View Source
var MethodAnnotationStore = framework.AnnotationStore{}
View Source
var PromService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "prom.PromService",
	HandlerType: (*PromServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryRpc",
			Handler:    _PromService_QueryRpc_Handler,
		},
		{
			MethodName: "GetQueryRpc",
			Handler:    _PromService_GetQueryRpc_Handler,
		},
		{
			MethodName: "QueryRangeRpc",
			Handler:    _PromService_QueryRangeRpc_Handler,
		},
		{
			MethodName: "GetQueryRangeRpc",
			Handler:    _PromService_GetQueryRangeRpc_Handler,
		},
		{
			MethodName: "GetLabelLabelNameValuesRpc",
			Handler:    _PromService_GetLabelLabelNameValuesRpc_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "transport/grpc/prom.proto",
}

PromService_ServiceDesc is the grpc.ServiceDesc for PromService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPromServiceServer

func RegisterPromServiceServer(s grpc.ServiceRegistrar, srv PromServiceServer)

Types

type GetLabelLabelNameValuesRpcRequest

type GetLabelLabelNameValuesRpcRequest struct {

	// Start timestamp. Optional.
	//
	Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	// End timestamp. Optional.
	//
	End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// Repeated series selector argument that selects the series from which to read the label values. Optional.
	//
	Match []string `protobuf:"bytes,3,rep,name=match,proto3" json:"match,omitempty"`
	// Label name
	//
	// Example: "/label/job/values"
	//
	// required
	LabelName string `protobuf:"bytes,4,opt,name=labelName,proto3" json:"labelName,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLabelLabelNameValuesRpcRequest) Descriptor deprecated

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

Deprecated: Use GetLabelLabelNameValuesRpcRequest.ProtoReflect.Descriptor instead.

func (*GetLabelLabelNameValuesRpcRequest) GetEnd

func (*GetLabelLabelNameValuesRpcRequest) GetLabelName

func (x *GetLabelLabelNameValuesRpcRequest) GetLabelName() string

func (*GetLabelLabelNameValuesRpcRequest) GetMatch

func (x *GetLabelLabelNameValuesRpcRequest) GetMatch() []string

func (*GetLabelLabelNameValuesRpcRequest) GetStart

func (*GetLabelLabelNameValuesRpcRequest) ProtoMessage

func (*GetLabelLabelNameValuesRpcRequest) ProtoMessage()

func (*GetLabelLabelNameValuesRpcRequest) ProtoReflect

func (*GetLabelLabelNameValuesRpcRequest) Reset

func (*GetLabelLabelNameValuesRpcRequest) String

type GetLabelLabelNameValuesRpcResponse

type GetLabelLabelNameValuesRpcResponse struct {
	Data   []string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	Status string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLabelLabelNameValuesRpcResponse) Descriptor deprecated

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

Deprecated: Use GetLabelLabelNameValuesRpcResponse.ProtoReflect.Descriptor instead.

func (*GetLabelLabelNameValuesRpcResponse) GetData

func (*GetLabelLabelNameValuesRpcResponse) GetStatus

func (*GetLabelLabelNameValuesRpcResponse) ProtoMessage

func (*GetLabelLabelNameValuesRpcResponse) ProtoMessage()

func (*GetLabelLabelNameValuesRpcResponse) ProtoReflect

func (*GetLabelLabelNameValuesRpcResponse) Reset

func (*GetLabelLabelNameValuesRpcResponse) String

type GetQueryRangeRpcRequest

type GetQueryRangeRpcRequest struct {

	// Prometheus expression query string.
	//
	// Example: "?query=up"
	//
	// required
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Start timestamp.
	//
	// Example: "&start=2015-07-01T20:10:30.781Z"
	//
	Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
	// End timestamp.
	//
	// Example: "&end=2015-07-01T20:11:00.781Z"
	//
	End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
	// Query resolution step width in "duration" format or float number of seconds.
	//
	// Example: "&step=15s"
	//
	Step string `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
	// Evaluation timeout. Optional.
	Timeout string `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryRangeRpcRequest) Descriptor deprecated

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

Deprecated: Use GetQueryRangeRpcRequest.ProtoReflect.Descriptor instead.

func (*GetQueryRangeRpcRequest) GetEnd

func (x *GetQueryRangeRpcRequest) GetEnd() string

func (*GetQueryRangeRpcRequest) GetQuery

func (x *GetQueryRangeRpcRequest) GetQuery() string

func (*GetQueryRangeRpcRequest) GetStart

func (x *GetQueryRangeRpcRequest) GetStart() string

func (*GetQueryRangeRpcRequest) GetStep

func (x *GetQueryRangeRpcRequest) GetStep() string

func (*GetQueryRangeRpcRequest) GetTimeout

func (x *GetQueryRangeRpcRequest) GetTimeout() string

func (*GetQueryRangeRpcRequest) ProtoMessage

func (*GetQueryRangeRpcRequest) ProtoMessage()

func (*GetQueryRangeRpcRequest) ProtoReflect

func (x *GetQueryRangeRpcRequest) ProtoReflect() protoreflect.Message

func (*GetQueryRangeRpcRequest) Reset

func (x *GetQueryRangeRpcRequest) Reset()

func (*GetQueryRangeRpcRequest) String

func (x *GetQueryRangeRpcRequest) String() string

type GetQueryRangeRpcResponse

type GetQueryRangeRpcResponse struct {
	Data   *QueryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Status string     `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryRangeRpcResponse) Descriptor deprecated

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

Deprecated: Use GetQueryRangeRpcResponse.ProtoReflect.Descriptor instead.

func (*GetQueryRangeRpcResponse) GetData

func (x *GetQueryRangeRpcResponse) GetData() *QueryData

func (*GetQueryRangeRpcResponse) GetStatus

func (x *GetQueryRangeRpcResponse) GetStatus() string

func (*GetQueryRangeRpcResponse) ProtoMessage

func (*GetQueryRangeRpcResponse) ProtoMessage()

func (*GetQueryRangeRpcResponse) ProtoReflect

func (x *GetQueryRangeRpcResponse) ProtoReflect() protoreflect.Message

func (*GetQueryRangeRpcResponse) Reset

func (x *GetQueryRangeRpcResponse) Reset()

func (*GetQueryRangeRpcResponse) String

func (x *GetQueryRangeRpcResponse) String() string

type GetQueryRpcRequest

type GetQueryRpcRequest struct {

	// Prometheus expression query string.
	//
	// Example: "?query=up"
	//
	// required
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Evaluation timestamp. Optional.
	//
	// The current server time is used if the "time" parameter is omitted.
	//
	// Optional.
	Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// Evaluation timeout. Optional.
	Timeout string `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryRpcRequest) Descriptor deprecated

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

Deprecated: Use GetQueryRpcRequest.ProtoReflect.Descriptor instead.

func (*GetQueryRpcRequest) GetQuery

func (x *GetQueryRpcRequest) GetQuery() string

func (*GetQueryRpcRequest) GetTime

func (x *GetQueryRpcRequest) GetTime() string

func (*GetQueryRpcRequest) GetTimeout

func (x *GetQueryRpcRequest) GetTimeout() string

func (*GetQueryRpcRequest) ProtoMessage

func (*GetQueryRpcRequest) ProtoMessage()

func (*GetQueryRpcRequest) ProtoReflect

func (x *GetQueryRpcRequest) ProtoReflect() protoreflect.Message

func (*GetQueryRpcRequest) Reset

func (x *GetQueryRpcRequest) Reset()

func (*GetQueryRpcRequest) String

func (x *GetQueryRpcRequest) String() string

type GetQueryRpcResponse

type GetQueryRpcResponse struct {
	Data   *QueryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Status string     `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryRpcResponse) Descriptor deprecated

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

Deprecated: Use GetQueryRpcResponse.ProtoReflect.Descriptor instead.

func (*GetQueryRpcResponse) GetData

func (x *GetQueryRpcResponse) GetData() *QueryData

func (*GetQueryRpcResponse) GetStatus

func (x *GetQueryRpcResponse) GetStatus() string

func (*GetQueryRpcResponse) ProtoMessage

func (*GetQueryRpcResponse) ProtoMessage()

func (*GetQueryRpcResponse) ProtoReflect

func (x *GetQueryRpcResponse) ProtoReflect() protoreflect.Message

func (*GetQueryRpcResponse) Reset

func (x *GetQueryRpcResponse) Reset()

func (*GetQueryRpcResponse) String

func (x *GetQueryRpcResponse) String() string

type PromServiceClient

type PromServiceClient interface {
	// Query is compatible to Prometheus POST /api/v1/query
	QueryRpc(ctx context.Context, in *QueryRpcRequest, opts ...grpc.CallOption) (*QueryRpcResponse, error)
	// GetQuery is compatible to Prometheus GET /api/v1/query
	GetQueryRpc(ctx context.Context, in *GetQueryRpcRequest, opts ...grpc.CallOption) (*GetQueryRpcResponse, error)
	// Query_range is compatible to Prometheus POST /api/v1/query_range
	QueryRangeRpc(ctx context.Context, in *QueryRangeRpcRequest, opts ...grpc.CallOption) (*QueryRangeRpcResponse, error)
	// GetQuery_range is compatible to Prometheus GET /api/v1/query_range
	GetQueryRangeRpc(ctx context.Context, in *GetQueryRangeRpcRequest, opts ...grpc.CallOption) (*GetQueryRangeRpcResponse, error)
	// GetLabel_Label_nameValues Returns label values
	// The following endpoint returns a list of label values for a provided label name
	//
	// The "data" section of the JSON response is a list of string label values.
	//
	GetLabelLabelNameValuesRpc(ctx context.Context, in *GetLabelLabelNameValuesRpcRequest, opts ...grpc.CallOption) (*GetLabelLabelNameValuesRpcResponse, error)
}

PromServiceClient is the client API for PromService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type PromServiceServer

type PromServiceServer interface {
	// Query is compatible to Prometheus POST /api/v1/query
	QueryRpc(context.Context, *QueryRpcRequest) (*QueryRpcResponse, error)
	// GetQuery is compatible to Prometheus GET /api/v1/query
	GetQueryRpc(context.Context, *GetQueryRpcRequest) (*GetQueryRpcResponse, error)
	// Query_range is compatible to Prometheus POST /api/v1/query_range
	QueryRangeRpc(context.Context, *QueryRangeRpcRequest) (*QueryRangeRpcResponse, error)
	// GetQuery_range is compatible to Prometheus GET /api/v1/query_range
	GetQueryRangeRpc(context.Context, *GetQueryRangeRpcRequest) (*GetQueryRangeRpcResponse, error)
	// GetLabel_Label_nameValues Returns label values
	// The following endpoint returns a list of label values for a provided label name
	//
	// The "data" section of the JSON response is a list of string label values.
	//
	GetLabelLabelNameValuesRpc(context.Context, *GetLabelLabelNameValuesRpcRequest) (*GetLabelLabelNameValuesRpcResponse, error)
	// contains filtered or unexported methods
}

PromServiceServer is the server API for PromService service. All implementations must embed UnimplementedPromServiceServer for forward compatibility

type QueryData

type QueryData struct {
	Result     *anypb.Any `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	ResultType string     `protobuf:"bytes,2,opt,name=resultType,proto3" json:"resultType,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryData) Descriptor deprecated

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

Deprecated: Use QueryData.ProtoReflect.Descriptor instead.

func (*QueryData) GetResult

func (x *QueryData) GetResult() *anypb.Any

func (*QueryData) GetResultType

func (x *QueryData) GetResultType() string

func (*QueryData) ProtoMessage

func (*QueryData) ProtoMessage()

func (*QueryData) ProtoReflect

func (x *QueryData) ProtoReflect() protoreflect.Message

func (*QueryData) Reset

func (x *QueryData) Reset()

func (*QueryData) String

func (x *QueryData) String() string

type QueryRangeRpcRequest

type QueryRangeRpcRequest struct {

	// Prometheus expression query string.
	//
	// Example: "?query=up"
	//
	// required
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Start timestamp.
	//
	// Example: "&start=2015-07-01T20:10:30.781Z"
	//
	Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
	// End timestamp.
	//
	// Example: "&end=2015-07-01T20:11:00.781Z"
	//
	End string `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
	// Query resolution step width in "duration" format or float number of seconds.
	//
	// Example: "&step=15s"
	//
	Step string `protobuf:"bytes,4,opt,name=step,proto3" json:"step,omitempty"`
	// Evaluation timeout. Optional.
	Timeout string `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRangeRpcRequest) Descriptor deprecated

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

Deprecated: Use QueryRangeRpcRequest.ProtoReflect.Descriptor instead.

func (*QueryRangeRpcRequest) GetEnd

func (x *QueryRangeRpcRequest) GetEnd() string

func (*QueryRangeRpcRequest) GetQuery

func (x *QueryRangeRpcRequest) GetQuery() string

func (*QueryRangeRpcRequest) GetStart

func (x *QueryRangeRpcRequest) GetStart() string

func (*QueryRangeRpcRequest) GetStep

func (x *QueryRangeRpcRequest) GetStep() string

func (*QueryRangeRpcRequest) GetTimeout

func (x *QueryRangeRpcRequest) GetTimeout() string

func (*QueryRangeRpcRequest) ProtoMessage

func (*QueryRangeRpcRequest) ProtoMessage()

func (*QueryRangeRpcRequest) ProtoReflect

func (x *QueryRangeRpcRequest) ProtoReflect() protoreflect.Message

func (*QueryRangeRpcRequest) Reset

func (x *QueryRangeRpcRequest) Reset()

func (*QueryRangeRpcRequest) String

func (x *QueryRangeRpcRequest) String() string

type QueryRangeRpcResponse

type QueryRangeRpcResponse struct {
	Data   *QueryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Status string     `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRangeRpcResponse) Descriptor deprecated

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

Deprecated: Use QueryRangeRpcResponse.ProtoReflect.Descriptor instead.

func (*QueryRangeRpcResponse) GetData

func (x *QueryRangeRpcResponse) GetData() *QueryData

func (*QueryRangeRpcResponse) GetStatus

func (x *QueryRangeRpcResponse) GetStatus() string

func (*QueryRangeRpcResponse) ProtoMessage

func (*QueryRangeRpcResponse) ProtoMessage()

func (*QueryRangeRpcResponse) ProtoReflect

func (x *QueryRangeRpcResponse) ProtoReflect() protoreflect.Message

func (*QueryRangeRpcResponse) Reset

func (x *QueryRangeRpcResponse) Reset()

func (*QueryRangeRpcResponse) String

func (x *QueryRangeRpcResponse) String() string

type QueryResponse

type QueryResponse struct {
	Data   *QueryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Status string     `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetData

func (x *QueryResponse) GetData() *QueryData

func (*QueryResponse) GetStatus

func (x *QueryResponse) GetStatus() string

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

type QueryRpcRequest

type QueryRpcRequest struct {

	// Prometheus expression query string.
	//
	// Example: "?query=up"
	//
	// required
	Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	// Evaluation timestamp. Optional.
	//
	// The current server time is used if the "time" parameter is omitted.
	//
	// Optional.
	Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// Evaluation timeout. Optional.
	Timeout string `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRpcRequest) Descriptor deprecated

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

Deprecated: Use QueryRpcRequest.ProtoReflect.Descriptor instead.

func (*QueryRpcRequest) GetQuery

func (x *QueryRpcRequest) GetQuery() string

func (*QueryRpcRequest) GetTime

func (x *QueryRpcRequest) GetTime() string

func (*QueryRpcRequest) GetTimeout

func (x *QueryRpcRequest) GetTimeout() string

func (*QueryRpcRequest) ProtoMessage

func (*QueryRpcRequest) ProtoMessage()

func (*QueryRpcRequest) ProtoReflect

func (x *QueryRpcRequest) ProtoReflect() protoreflect.Message

func (*QueryRpcRequest) Reset

func (x *QueryRpcRequest) Reset()

func (*QueryRpcRequest) String

func (x *QueryRpcRequest) String() string

type QueryRpcResponse

type QueryRpcResponse struct {
	Data   *QueryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Status string     `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRpcResponse) Descriptor deprecated

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

Deprecated: Use QueryRpcResponse.ProtoReflect.Descriptor instead.

func (*QueryRpcResponse) GetData

func (x *QueryRpcResponse) GetData() *QueryData

func (*QueryRpcResponse) GetStatus

func (x *QueryRpcResponse) GetStatus() string

func (*QueryRpcResponse) ProtoMessage

func (*QueryRpcResponse) ProtoMessage()

func (*QueryRpcResponse) ProtoReflect

func (x *QueryRpcResponse) ProtoReflect() protoreflect.Message

func (*QueryRpcResponse) Reset

func (x *QueryRpcResponse) Reset()

func (*QueryRpcResponse) String

func (x *QueryRpcResponse) String() string

type UnimplementedPromServiceServer

type UnimplementedPromServiceServer struct {
}

UnimplementedPromServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPromServiceServer) GetQueryRangeRpc

func (UnimplementedPromServiceServer) GetQueryRpc

func (UnimplementedPromServiceServer) QueryRangeRpc

func (UnimplementedPromServiceServer) QueryRpc

type UnsafePromServiceServer

type UnsafePromServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePromServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PromServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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