shardnode

package
v0.0.0-...-d4659c6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShardNode_BatchQuery_FullMethodName    = "/shardnode.ShardNode/BatchQuery"
	ShardNode_SendBlocks_FullMethodName    = "/shardnode.ShardNode/SendBlocks"
	ShardNode_AckSentBlocks_FullMethodName = "/shardnode.ShardNode/AckSentBlocks"
	ShardNode_JoinRaftVoter_FullMethodName = "/shardnode.ShardNode/JoinRaftVoter"
)

Variables

View Source
var File_shardnode_proto protoreflect.FileDescriptor
View Source
var ShardNode_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shardnode.ShardNode",
	HandlerType: (*ShardNodeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BatchQuery",
			Handler:    _ShardNode_BatchQuery_Handler,
		},
		{
			MethodName: "SendBlocks",
			Handler:    _ShardNode_SendBlocks_Handler,
		},
		{
			MethodName: "AckSentBlocks",
			Handler:    _ShardNode_AckSentBlocks_Handler,
		},
		{
			MethodName: "JoinRaftVoter",
			Handler:    _ShardNode_JoinRaftVoter_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shardnode.proto",
}

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

Functions

func RegisterShardNodeServer

func RegisterShardNodeServer(s grpc.ServiceRegistrar, srv ShardNodeServer)

Types

type Ack

type Ack struct {
	Block string `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	IsAck bool   `protobuf:"varint,2,opt,name=is_ack,json=isAck,proto3" json:"is_ack,omitempty"` // if flase: nack
	// contains filtered or unexported fields
}

it represents both acks and nacks

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) GetBlock

func (x *Ack) GetBlock() string

func (*Ack) GetIsAck

func (x *Ack) GetIsAck() bool

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

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

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) String

func (x *Ack) String() string

type AckSentBlocksReply

type AckSentBlocksReply struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*AckSentBlocksReply) Descriptor deprecated

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

Deprecated: Use AckSentBlocksReply.ProtoReflect.Descriptor instead.

func (*AckSentBlocksReply) GetSuccess

func (x *AckSentBlocksReply) GetSuccess() bool

func (*AckSentBlocksReply) ProtoMessage

func (*AckSentBlocksReply) ProtoMessage()

func (*AckSentBlocksReply) ProtoReflect

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

func (*AckSentBlocksReply) Reset

func (x *AckSentBlocksReply) Reset()

func (*AckSentBlocksReply) String

func (x *AckSentBlocksReply) String() string

type AckSentBlocksRequest

type AckSentBlocksRequest struct {
	Acks []*Ack `protobuf:"bytes,1,rep,name=acks,proto3" json:"acks,omitempty"`
	// contains filtered or unexported fields
}

func (*AckSentBlocksRequest) Descriptor deprecated

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

Deprecated: Use AckSentBlocksRequest.ProtoReflect.Descriptor instead.

func (*AckSentBlocksRequest) GetAcks

func (x *AckSentBlocksRequest) GetAcks() []*Ack

func (*AckSentBlocksRequest) ProtoMessage

func (*AckSentBlocksRequest) ProtoMessage()

func (*AckSentBlocksRequest) ProtoReflect

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

func (*AckSentBlocksRequest) Reset

func (x *AckSentBlocksRequest) Reset()

func (*AckSentBlocksRequest) String

func (x *AckSentBlocksRequest) String() string

type Block

type Block struct {
	Block string `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Path  int32  `protobuf:"varint,3,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBlock

func (x *Block) GetBlock() string

func (*Block) GetPath

func (x *Block) GetPath() int32

func (*Block) GetValue

func (x *Block) GetValue() string

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

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

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type JoinRaftVoterReply

type JoinRaftVoterReply struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinRaftVoterReply) Descriptor deprecated

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

Deprecated: Use JoinRaftVoterReply.ProtoReflect.Descriptor instead.

func (*JoinRaftVoterReply) GetSuccess

func (x *JoinRaftVoterReply) GetSuccess() bool

func (*JoinRaftVoterReply) ProtoMessage

func (*JoinRaftVoterReply) ProtoMessage()

func (*JoinRaftVoterReply) ProtoReflect

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

func (*JoinRaftVoterReply) Reset

func (x *JoinRaftVoterReply) Reset()

func (*JoinRaftVoterReply) String

func (x *JoinRaftVoterReply) String() string

type JoinRaftVoterRequest

type JoinRaftVoterRequest struct {
	NodeId   int32  `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	NodeAddr string `protobuf:"bytes,2,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinRaftVoterRequest) Descriptor deprecated

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

Deprecated: Use JoinRaftVoterRequest.ProtoReflect.Descriptor instead.

func (*JoinRaftVoterRequest) GetNodeAddr

func (x *JoinRaftVoterRequest) GetNodeAddr() string

func (*JoinRaftVoterRequest) GetNodeId

func (x *JoinRaftVoterRequest) GetNodeId() int32

func (*JoinRaftVoterRequest) ProtoMessage

func (*JoinRaftVoterRequest) ProtoMessage()

func (*JoinRaftVoterRequest) ProtoReflect

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

func (*JoinRaftVoterRequest) Reset

func (x *JoinRaftVoterRequest) Reset()

func (*JoinRaftVoterRequest) String

func (x *JoinRaftVoterRequest) String() string

type ReadReply

type ReadReply struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Value     string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadReply) Descriptor deprecated

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

Deprecated: Use ReadReply.ProtoReflect.Descriptor instead.

func (*ReadReply) GetRequestId

func (x *ReadReply) GetRequestId() string

func (*ReadReply) GetValue

func (x *ReadReply) GetValue() string

func (*ReadReply) ProtoMessage

func (*ReadReply) ProtoMessage()

func (*ReadReply) ProtoReflect

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

func (*ReadReply) Reset

func (x *ReadReply) Reset()

func (*ReadReply) String

func (x *ReadReply) String() string

type ReadRequest

type ReadRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Block     string `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetBlock

func (x *ReadRequest) GetBlock() string

func (*ReadRequest) GetRequestId

func (x *ReadRequest) GetRequestId() string

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReplyBatch

type ReplyBatch struct {
	ReadReplies  []*ReadReply  `protobuf:"bytes,1,rep,name=read_replies,json=readReplies,proto3" json:"read_replies,omitempty"`
	WriteReplies []*WriteReply `protobuf:"bytes,2,rep,name=write_replies,json=writeReplies,proto3" json:"write_replies,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyBatch) Descriptor deprecated

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

Deprecated: Use ReplyBatch.ProtoReflect.Descriptor instead.

func (*ReplyBatch) GetReadReplies

func (x *ReplyBatch) GetReadReplies() []*ReadReply

func (*ReplyBatch) GetWriteReplies

func (x *ReplyBatch) GetWriteReplies() []*WriteReply

func (*ReplyBatch) ProtoMessage

func (*ReplyBatch) ProtoMessage()

func (*ReplyBatch) ProtoReflect

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

func (*ReplyBatch) Reset

func (x *ReplyBatch) Reset()

func (*ReplyBatch) String

func (x *ReplyBatch) String() string

type RequestBatch

type RequestBatch struct {
	ReadRequests  []*ReadRequest  `protobuf:"bytes,1,rep,name=read_requests,json=readRequests,proto3" json:"read_requests,omitempty"`
	WriteRequests []*WriteRequest `protobuf:"bytes,2,rep,name=write_requests,json=writeRequests,proto3" json:"write_requests,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestBatch) Descriptor deprecated

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

Deprecated: Use RequestBatch.ProtoReflect.Descriptor instead.

func (*RequestBatch) GetReadRequests

func (x *RequestBatch) GetReadRequests() []*ReadRequest

func (*RequestBatch) GetWriteRequests

func (x *RequestBatch) GetWriteRequests() []*WriteRequest

func (*RequestBatch) ProtoMessage

func (*RequestBatch) ProtoMessage()

func (*RequestBatch) ProtoReflect

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

func (*RequestBatch) Reset

func (x *RequestBatch) Reset()

func (*RequestBatch) String

func (x *RequestBatch) String() string

type SendBlocksReply

type SendBlocksReply struct {
	Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

func (*SendBlocksReply) Descriptor deprecated

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

Deprecated: Use SendBlocksReply.ProtoReflect.Descriptor instead.

func (*SendBlocksReply) GetBlocks

func (x *SendBlocksReply) GetBlocks() []*Block

func (*SendBlocksReply) ProtoMessage

func (*SendBlocksReply) ProtoMessage()

func (*SendBlocksReply) ProtoReflect

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

func (*SendBlocksReply) Reset

func (x *SendBlocksReply) Reset()

func (*SendBlocksReply) String

func (x *SendBlocksReply) String() string

type SendBlocksRequest

type SendBlocksRequest struct {
	MaxBlocks int32 `protobuf:"varint,1,opt,name=maxBlocks,proto3" json:"maxBlocks,omitempty"`
	StorageId int32 `protobuf:"varint,3,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SendBlocksRequest) Descriptor deprecated

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

Deprecated: Use SendBlocksRequest.ProtoReflect.Descriptor instead.

func (*SendBlocksRequest) GetMaxBlocks

func (x *SendBlocksRequest) GetMaxBlocks() int32

func (*SendBlocksRequest) GetStorageId

func (x *SendBlocksRequest) GetStorageId() int32

func (*SendBlocksRequest) ProtoMessage

func (*SendBlocksRequest) ProtoMessage()

func (*SendBlocksRequest) ProtoReflect

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

func (*SendBlocksRequest) Reset

func (x *SendBlocksRequest) Reset()

func (*SendBlocksRequest) String

func (x *SendBlocksRequest) String() string

type ShardNodeClient

type ShardNodeClient interface {
	BatchQuery(ctx context.Context, in *RequestBatch, opts ...grpc.CallOption) (*ReplyBatch, error)
	SendBlocks(ctx context.Context, in *SendBlocksRequest, opts ...grpc.CallOption) (*SendBlocksReply, error)
	AckSentBlocks(ctx context.Context, in *AckSentBlocksRequest, opts ...grpc.CallOption) (*AckSentBlocksReply, error)
	JoinRaftVoter(ctx context.Context, in *JoinRaftVoterRequest, opts ...grpc.CallOption) (*JoinRaftVoterReply, error)
}

ShardNodeClient is the client API for ShardNode 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 NewShardNodeClient

func NewShardNodeClient(cc grpc.ClientConnInterface) ShardNodeClient

type ShardNodeServer

type ShardNodeServer interface {
	BatchQuery(context.Context, *RequestBatch) (*ReplyBatch, error)
	SendBlocks(context.Context, *SendBlocksRequest) (*SendBlocksReply, error)
	AckSentBlocks(context.Context, *AckSentBlocksRequest) (*AckSentBlocksReply, error)
	JoinRaftVoter(context.Context, *JoinRaftVoterRequest) (*JoinRaftVoterReply, error)
	// contains filtered or unexported methods
}

ShardNodeServer is the server API for ShardNode service. All implementations must embed UnimplementedShardNodeServer for forward compatibility

type UnimplementedShardNodeServer

type UnimplementedShardNodeServer struct {
}

UnimplementedShardNodeServer must be embedded to have forward compatible implementations.

func (UnimplementedShardNodeServer) AckSentBlocks

func (UnimplementedShardNodeServer) BatchQuery

func (UnimplementedShardNodeServer) JoinRaftVoter

func (UnimplementedShardNodeServer) SendBlocks

type UnsafeShardNodeServer

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

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

type WriteReply

type WriteReply struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Success   bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteReply) Descriptor deprecated

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

Deprecated: Use WriteReply.ProtoReflect.Descriptor instead.

func (*WriteReply) GetRequestId

func (x *WriteReply) GetRequestId() string

func (*WriteReply) GetSuccess

func (x *WriteReply) GetSuccess() bool

func (*WriteReply) ProtoMessage

func (*WriteReply) ProtoMessage()

func (*WriteReply) ProtoReflect

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

func (*WriteReply) Reset

func (x *WriteReply) Reset()

func (*WriteReply) String

func (x *WriteReply) String() string

type WriteRequest

type WriteRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Block     string `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
	Value     string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetBlock

func (x *WriteRequest) GetBlock() string

func (*WriteRequest) GetRequestId

func (x *WriteRequest) GetRequestId() string

func (*WriteRequest) GetValue

func (x *WriteRequest) GetValue() string

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

Jump to

Keyboard shortcuts

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