metricsdbrpc

package
v0.1.33 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Value_Type_name = map[int32]string{
		0:  "UNDEFINED",
		1:  "INT",
		2:  "INT8",
		3:  "INT16",
		4:  "INT32",
		5:  "INT64",
		6:  "UINT",
		7:  "UINT8",
		8:  "UINT16",
		9:  "UINT32",
		10: "UINT64",
		11: "BOOL",
		12: "FLOAT64",
		13: "STRING",
		14: "TIMESTAMP",
		15: "DURATION",
	}
	Value_Type_value = map[string]int32{
		"UNDEFINED": 0,
		"INT":       1,
		"INT8":      2,
		"INT16":     3,
		"INT32":     4,
		"INT64":     5,
		"UINT":      6,
		"UINT8":     7,
		"UINT16":    8,
		"UINT32":    9,
		"UINT64":    10,
		"BOOL":      11,
		"FLOAT64":   12,
		"STRING":    13,
		"TIMESTAMP": 14,
		"DURATION":  15,
	}
)

Enum value maps for Value_Type.

View Source
var File_metricsdb_proto protoreflect.FileDescriptor
View Source
var Metricsdb_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "metricsdb.Metricsdb",
	HandlerType: (*MetricsdbServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Submit",
			Handler:       _Metricsdb_Submit_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "metricsdb.proto",
}

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

Functions

func FromPoint

func FromPoint(p *Point) (*metrics.Point, error)

FromPoint converts a *Point to a *metrics.Point.

func RegisterMetricsdbServer

func RegisterMetricsdbServer(s grpc.ServiceRegistrar, srv MetricsdbServer)

Types

type MetricsdbClient

type MetricsdbClient interface {
	Submit(ctx context.Context, opts ...grpc.CallOption) (Metricsdb_SubmitClient, error)
}

MetricsdbClient is the client API for Metricsdb 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.

func NewMetricsdbClient

func NewMetricsdbClient(cc grpc.ClientConnInterface) MetricsdbClient

type MetricsdbServer

type MetricsdbServer interface {
	Submit(Metricsdb_SubmitServer) error
	// contains filtered or unexported methods
}

MetricsdbServer is the server API for Metricsdb service. All implementations must embed UnimplementedMetricsdbServer for forward compatibility

type Metricsdb_SubmitClient

type Metricsdb_SubmitClient interface {
	Send(*Point) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type Metricsdb_SubmitServer

type Metricsdb_SubmitServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Point, error)
	grpc.ServerStream
}

type Point

type Point struct {
	Name      string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Fields    map[string]*Value      `` /* 153-byte string literal not displayed */
	Tags      map[string]string      `` /* 149-byte string literal not displayed */
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Point is the type defining a metric point.

func ToPoint

func ToPoint(p *metrics.Point) (*Point, error)

ToPoint converts a *metrics.Point to a *Point.

func (*Point) Descriptor deprecated

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

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetFields

func (x *Point) GetFields() map[string]*Value

func (*Point) GetName

func (x *Point) GetName() string

func (*Point) GetTags

func (x *Point) GetTags() map[string]string

func (*Point) GetTimestamp

func (x *Point) GetTimestamp() *timestamppb.Timestamp

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect added in v0.1.25

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

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

type UnimplementedMetricsdbServer

type UnimplementedMetricsdbServer struct {
}

UnimplementedMetricsdbServer must be embedded to have forward compatible implementations.

func (UnimplementedMetricsdbServer) Submit

type UnsafeMetricsdbServer added in v0.1.25

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

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

type Value

type Value struct {
	Type Value_Type `protobuf:"varint,1,opt,name=type,proto3,enum=metricsdb.Value_Type" json:"type,omitempty"` // The value type
	// Types that are assignable to Value:
	//	*Value_Int32Value
	//	*Value_Int64Value
	//	*Value_Uint32Value
	//	*Value_Uint64Value
	//	*Value_BoolValue
	//	*Value_DoubleValue
	//	*Value_StringValue
	//	*Value_TimestampValue
	//	*Value_DurationValue
	Value isValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Value describes a value in a point.

func (*Value) Descriptor deprecated

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

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetBoolValue

func (x *Value) GetBoolValue() bool

func (*Value) GetDoubleValue

func (x *Value) GetDoubleValue() float64

func (*Value) GetDurationValue

func (x *Value) GetDurationValue() *durationpb.Duration

func (*Value) GetInt32Value

func (x *Value) GetInt32Value() int32

func (*Value) GetInt64Value

func (x *Value) GetInt64Value() int64

func (*Value) GetStringValue

func (x *Value) GetStringValue() string

func (*Value) GetTimestampValue

func (x *Value) GetTimestampValue() *timestamppb.Timestamp

func (*Value) GetType

func (x *Value) GetType() Value_Type

func (*Value) GetUint32Value

func (x *Value) GetUint32Value() uint32

func (*Value) GetUint64Value

func (x *Value) GetUint64Value() uint64

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect added in v0.1.25

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type Value_BoolValue

type Value_BoolValue struct {
	BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"` // BOOL
}

type Value_DoubleValue

type Value_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,7,opt,name=double_value,json=doubleValue,proto3,oneof"` // FLOAT64
}

type Value_DurationValue

type Value_DurationValue struct {
	DurationValue *durationpb.Duration `protobuf:"bytes,10,opt,name=duration_value,json=durationValue,proto3,oneof"` // DURATION
}

type Value_Int32Value

type Value_Int32Value struct {
	Int32Value int32 `protobuf:"varint,2,opt,name=int32_value,json=int32Value,proto3,oneof"` // INT8, INT16, INT32
}

type Value_Int64Value

type Value_Int64Value struct {
	Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"` // INT, INT64
}

type Value_StringValue

type Value_StringValue struct {
	StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"` // STRING
}

type Value_TimestampValue

type Value_TimestampValue struct {
	TimestampValue *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` // TIMESTAMP
}

type Value_Type

type Value_Type int32

Type enumerates the possible value types

const (
	Value_UNDEFINED Value_Type = 0 // Illegal value
	Value_INT       Value_Type = 1
	Value_INT8      Value_Type = 2
	Value_INT16     Value_Type = 3
	Value_INT32     Value_Type = 4
	Value_INT64     Value_Type = 5
	Value_UINT      Value_Type = 6
	Value_UINT8     Value_Type = 7
	Value_UINT16    Value_Type = 8
	Value_UINT32    Value_Type = 9
	Value_UINT64    Value_Type = 10
	Value_BOOL      Value_Type = 11
	Value_FLOAT64   Value_Type = 12
	Value_STRING    Value_Type = 13
	Value_TIMESTAMP Value_Type = 14
	Value_DURATION  Value_Type = 15
)

func (Value_Type) Descriptor added in v0.1.25

func (Value_Type) Descriptor() protoreflect.EnumDescriptor

func (Value_Type) Enum added in v0.1.25

func (x Value_Type) Enum() *Value_Type

func (Value_Type) EnumDescriptor deprecated

func (Value_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Value_Type.Descriptor instead.

func (Value_Type) Number added in v0.1.25

func (x Value_Type) Number() protoreflect.EnumNumber

func (Value_Type) String

func (x Value_Type) String() string

func (Value_Type) Type added in v0.1.25

type Value_Uint32Value

type Value_Uint32Value struct {
	Uint32Value uint32 `protobuf:"varint,4,opt,name=uint32_value,json=uint32Value,proto3,oneof"` // UINT8, UINT16, UINT32
}

type Value_Uint64Value

type Value_Uint64Value struct {
	Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3,oneof"` // UINT, UINT64
}

Jump to

Keyboard shortcuts

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