Documentation ¶
Index ¶
- Variables
- func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetLength() int64
- func (x *ReadRequest) GetOffset() int64
- func (x *ReadRequest) GetTenantId() string
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadResponse
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetTenantId() string
- func (x *RegisterRequest) GetWantStorageSize() int64
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type StorageClient
- type StorageServer
- type UnimplementedStorageServer
- type UnsafeStorageServer
- type Write
- func (*Write) Descriptor() ([]byte, []int)deprecated
- func (x *Write) GetBuf() []byte
- func (x *Write) GetLength() int64
- func (x *Write) GetOffset() int64
- func (x *Write) GetSeqNo() int64
- func (*Write) ProtoMessage()
- func (x *Write) ProtoReflect() protoreflect.Message
- func (x *Write) Reset()
- func (x *Write) String() string
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteRequest) GetTenantId() string
- func (x *WriteRequest) GetWrites() []*Write
- func (*WriteRequest) ProtoMessage()
- func (x *WriteRequest) ProtoReflect() protoreflect.Message
- func (x *WriteRequest) Reset()
- func (x *WriteRequest) String() string
- type WriteResponse
Constants ¶
This section is empty.
Variables ¶
var File_storage_proto protoreflect.FileDescriptor
var Storage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.Storage", HandlerType: (*StorageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Storage_Register_Handler, }, { MethodName: "Read", Handler: _Storage_Read_Handler, }, { MethodName: "Write", Handler: _Storage_Write_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "storage.proto", }
Storage_ServiceDesc is the grpc.ServiceDesc for Storage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStorageServer ¶
func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)
Types ¶
type ReadRequest ¶
type ReadRequest struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` TenantId string `protobuf:"bytes,3,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // contains filtered or unexported fields }
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetLength ¶
func (x *ReadRequest) GetLength() int64
func (*ReadRequest) GetOffset ¶
func (x *ReadRequest) GetOffset() int64
func (*ReadRequest) GetTenantId ¶
func (x *ReadRequest) GetTenantId() 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 ReadResponse ¶
type ReadResponse struct { Buf []byte `protobuf:"bytes,1,opt,name=buf,proto3" json:"buf,omitempty"` // contains filtered or unexported fields }
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetBuf ¶
func (x *ReadResponse) GetBuf() []byte
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type RegisterRequest ¶
type RegisterRequest struct { TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` WantStorageSize int64 `protobuf:"varint,2,opt,name=want_storage_size,json=wantStorageSize,proto3" json:"want_storage_size,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetTenantId ¶
func (x *RegisterRequest) GetTenantId() string
func (*RegisterRequest) GetWantStorageSize ¶
func (x *RegisterRequest) GetWantStorageSize() int64
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { StorageSize int64 `protobuf:"varint,1,opt,name=storage_size,json=storageSize,proto3" json:"storage_size,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetStorageSize ¶
func (x *RegisterResponse) GetStorageSize() int64
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type StorageClient ¶
type StorageClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) }
StorageClient is the client API for Storage 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 NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageServer ¶
type StorageServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Read(context.Context, *ReadRequest) (*ReadResponse, error) Write(context.Context, *WriteRequest) (*WriteResponse, error) // contains filtered or unexported methods }
StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer must be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) Read ¶
func (UnimplementedStorageServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
func (UnimplementedStorageServer) Register ¶
func (UnimplementedStorageServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedStorageServer) Write ¶
func (UnimplementedStorageServer) Write(context.Context, *WriteRequest) (*WriteResponse, error)
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.
type Write ¶
type Write struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Length int64 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` Buf []byte `protobuf:"bytes,3,opt,name=buf,proto3" json:"buf,omitempty"` SeqNo int64 `protobuf:"varint,5,opt,name=seq_no,json=seqNo,proto3" json:"seq_no,omitempty"` // int64 flags = 6; // contains filtered or unexported fields }
func (*Write) Descriptor
deprecated
func (*Write) ProtoMessage ¶
func (*Write) ProtoMessage()
func (*Write) ProtoReflect ¶
func (x *Write) ProtoReflect() protoreflect.Message
type WriteRequest ¶
type WriteRequest struct { Writes []*Write `protobuf:"bytes,1,rep,name=writes,proto3" json:"writes,omitempty"` TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` // contains filtered or unexported fields }
func (*WriteRequest) Descriptor
deprecated
func (*WriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) GetTenantId ¶
func (x *WriteRequest) GetTenantId() string
func (*WriteRequest) GetWrites ¶
func (x *WriteRequest) GetWrites() []*Write
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