v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_banyandb_stream_v1_query_proto protoreflect.FileDescriptor
View Source
var File_banyandb_stream_v1_rpc_proto protoreflect.FileDescriptor
View Source
var File_banyandb_stream_v1_write_proto protoreflect.FileDescriptor
View Source
var StreamService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "banyandb.stream.v1.StreamService",
	HandlerType: (*StreamServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Query",
			Handler:    _StreamService_Query_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Write",
			Handler:       _StreamService_Write_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "banyandb/stream/v1/rpc.proto",
}

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

Functions

func RegisterStreamServiceServer

func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)

Types

type Element

type Element struct {

	// element_id could be span_id of a Span or segment_id of a Segment in the context of stream
	ElementId string `protobuf:"bytes,1,opt,name=element_id,json=elementId,proto3" json:"element_id,omitempty"`
	// timestamp represents a millisecond
	// 1) either the start time of a Span/Segment,
	// 2) or the timestamp of a log
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// fields contains all indexed Field. Some typical names,
	// - stream_id
	// - duration
	// - service_name
	// - service_instance_id
	// - end_time_milliseconds
	TagFamilies []*v1.TagFamily `protobuf:"bytes,3,rep,name=tag_families,json=tagFamilies,proto3" json:"tag_families,omitempty"`
	// contains filtered or unexported fields
}

Element represents (stream context) a Span defined in Google Dapper paper or equivalently a Segment in Skywalking. (Log context) a log

func (*Element) Descriptor deprecated

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

Deprecated: Use Element.ProtoReflect.Descriptor instead.

func (*Element) GetElementId

func (x *Element) GetElementId() string

func (*Element) GetTagFamilies

func (x *Element) GetTagFamilies() []*v1.TagFamily

func (*Element) GetTimestamp

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

func (*Element) ProtoMessage

func (*Element) ProtoMessage()

func (*Element) ProtoReflect

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

func (*Element) Reset

func (x *Element) Reset()

func (*Element) String

func (x *Element) String() string

type ElementValue

type ElementValue struct {

	// element_id could be span_id of a Span or segment_id of a Segment in the context of stream
	ElementId string `protobuf:"bytes,1,opt,name=element_id,json=elementId,proto3" json:"element_id,omitempty"`
	// timestamp is in the timeunit of milliseconds. It represents
	// 1) either the start time of a Span/Segment,
	// 2) or the timestamp of a log
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// the order of tag_families' items match the stream schema
	TagFamilies []*v1.TagFamilyForWrite `protobuf:"bytes,3,rep,name=tag_families,json=tagFamilies,proto3" json:"tag_families,omitempty"`
	// contains filtered or unexported fields
}

func (*ElementValue) Descriptor deprecated

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

Deprecated: Use ElementValue.ProtoReflect.Descriptor instead.

func (*ElementValue) GetElementId

func (x *ElementValue) GetElementId() string

func (*ElementValue) GetTagFamilies

func (x *ElementValue) GetTagFamilies() []*v1.TagFamilyForWrite

func (*ElementValue) GetTimestamp

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

func (*ElementValue) ProtoMessage

func (*ElementValue) ProtoMessage()

func (*ElementValue) ProtoReflect

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

func (*ElementValue) Reset

func (x *ElementValue) Reset()

func (*ElementValue) String

func (x *ElementValue) String() string

type InternalWriteRequest

type InternalWriteRequest struct {
	ShardId    uint32        `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
	SeriesHash []byte        `protobuf:"bytes,2,opt,name=series_hash,json=seriesHash,proto3" json:"series_hash,omitempty"`
	Request    *WriteRequest `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*InternalWriteRequest) Descriptor deprecated

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

Deprecated: Use InternalWriteRequest.ProtoReflect.Descriptor instead.

func (*InternalWriteRequest) GetRequest

func (x *InternalWriteRequest) GetRequest() *WriteRequest

func (*InternalWriteRequest) GetSeriesHash

func (x *InternalWriteRequest) GetSeriesHash() []byte

func (*InternalWriteRequest) GetShardId

func (x *InternalWriteRequest) GetShardId() uint32

func (*InternalWriteRequest) ProtoMessage

func (*InternalWriteRequest) ProtoMessage()

func (*InternalWriteRequest) ProtoReflect

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

func (*InternalWriteRequest) Reset

func (x *InternalWriteRequest) Reset()

func (*InternalWriteRequest) String

func (x *InternalWriteRequest) String() string

type QueryRequest

type QueryRequest struct {

	// metadata is required
	Metadata *v11.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// time_range is a range query with begin/end time of entities in the timeunit of milliseconds.
	// In the context of stream, it represents the range of the `startTime` for spans/segments,
	// while in the context of Log, it means the range of the timestamp(s) for logs.
	// it is always recommended to specify time range for performance reason
	TimeRange *v1.TimeRange `protobuf:"bytes,2,opt,name=time_range,json=timeRange,proto3" json:"time_range,omitempty"`
	// offset is used to support pagination, together with the following limit
	Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	// limit is used to impose a boundary on the number of records being returned
	Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
	// order_by is given to specify the sort for a field. So far, only fields in the type of Integer are supported
	OrderBy *v1.QueryOrder `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	// tag_families are indexed.
	Criteria []*v1.Criteria `protobuf:"bytes,6,rep,name=criteria,proto3" json:"criteria,omitempty"`
	// projection can be used to select the key names of the element in the response
	Projection *v1.TagProjection `protobuf:"bytes,7,opt,name=projection,proto3" json:"projection,omitempty"`
	// contains filtered or unexported fields
}

QueryRequest is the request contract for query.

func (*QueryRequest) Descriptor deprecated

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetCriteria

func (x *QueryRequest) GetCriteria() []*v1.Criteria

func (*QueryRequest) GetLimit

func (x *QueryRequest) GetLimit() uint32

func (*QueryRequest) GetMetadata

func (x *QueryRequest) GetMetadata() *v11.Metadata

func (*QueryRequest) GetOffset

func (x *QueryRequest) GetOffset() uint32

func (*QueryRequest) GetOrderBy

func (x *QueryRequest) GetOrderBy() *v1.QueryOrder

func (*QueryRequest) GetProjection

func (x *QueryRequest) GetProjection() *v1.TagProjection

func (*QueryRequest) GetTimeRange

func (x *QueryRequest) GetTimeRange() *v1.TimeRange

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

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

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

type QueryResponse

type QueryResponse struct {

	// elements are the actual data returned
	Elements []*Element `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

QueryResponse is the response for a query to the Query module.

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetElements

func (x *QueryResponse) GetElements() []*Element

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 StreamServiceClient

type StreamServiceClient interface {
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
	Write(ctx context.Context, opts ...grpc.CallOption) (StreamService_WriteClient, error)
}

StreamServiceClient is the client API for StreamService 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 StreamServiceServer

type StreamServiceServer interface {
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
	Write(StreamService_WriteServer) error
	// contains filtered or unexported methods
}

StreamServiceServer is the server API for StreamService service. All implementations must embed UnimplementedStreamServiceServer for forward compatibility

type StreamService_WriteClient

type StreamService_WriteClient interface {
	Send(*WriteRequest) error
	Recv() (*WriteResponse, error)
	grpc.ClientStream
}

type StreamService_WriteServer

type StreamService_WriteServer interface {
	Send(*WriteResponse) error
	Recv() (*WriteRequest, error)
	grpc.ServerStream
}

type UnimplementedStreamServiceServer

type UnimplementedStreamServiceServer struct {
}

UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamServiceServer) Query

func (UnimplementedStreamServiceServer) Write

type UnsafeStreamServiceServer

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

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

type WriteRequest

type WriteRequest struct {

	// the metadata is only required in the first write.
	Metadata *v11.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// the element is required.
	Element *ElementValue `protobuf:"bytes,2,opt,name=element,proto3" json:"element,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetElement

func (x *WriteRequest) GetElement() *ElementValue

func (*WriteRequest) GetMetadata

func (x *WriteRequest) GetMetadata() *v11.Metadata

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

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

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteResponse

type WriteResponse struct {
	// contains filtered or unexported fields
}

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

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

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

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