Documentation ¶
Index ¶
- Variables
- func RegisterObjectServer(s grpc.ServiceRegistrar, srv ObjectServer)
- type ObjectClient
- type ObjectManifest
- func (*ObjectManifest) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectManifest) GetChunks() []*ObjectManifest_ChunkWithOffset
- func (x *ObjectManifest) GetHash() []byte
- func (*ObjectManifest) ProtoMessage()
- func (x *ObjectManifest) ProtoReflect() protoreflect.Message
- func (x *ObjectManifest) Reset()
- func (x *ObjectManifest) String() string
- type ObjectManifest_ChunkWithOffset
- func (*ObjectManifest_ChunkWithOffset) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectManifest_ChunkWithOffset) GetHash() []byte
- func (x *ObjectManifest_ChunkWithOffset) GetOffset() int64
- func (x *ObjectManifest_ChunkWithOffset) GetSize() int64
- func (*ObjectManifest_ChunkWithOffset) ProtoMessage()
- func (x *ObjectManifest_ChunkWithOffset) ProtoReflect() protoreflect.Message
- func (x *ObjectManifest_ChunkWithOffset) Reset()
- func (x *ObjectManifest_ChunkWithOffset) String() string
- type ObjectServer
- type UnimplementedObjectServer
- type UnsafeObjectServer
Constants ¶
This section is empty.
Variables ¶
var File_chunky_proto protoreflect.FileDescriptor
var Object_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chunky.Object", HandlerType: (*ObjectServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Fetch", Handler: _Object_Fetch_Handler, }, { MethodName: "Push", Handler: _Object_Push_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "chunky.proto", }
Object_ServiceDesc is the grpc.ServiceDesc for Object service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterObjectServer ¶
func RegisterObjectServer(s grpc.ServiceRegistrar, srv ObjectServer)
Types ¶
type ObjectClient ¶
type ObjectClient interface { Fetch(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*ObjectManifest, error) Push(ctx context.Context, in *ObjectManifest, opts ...grpc.CallOption) (*empty.Empty, error) }
ObjectClient is the client API for Object 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 NewObjectClient ¶
func NewObjectClient(cc grpc.ClientConnInterface) ObjectClient
type ObjectManifest ¶
type ObjectManifest struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Chunks must be ordered by offset. Chunks []*ObjectManifest_ChunkWithOffset `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks,omitempty"` // contains filtered or unexported fields }
func (*ObjectManifest) Descriptor
deprecated
func (*ObjectManifest) Descriptor() ([]byte, []int)
Deprecated: Use ObjectManifest.ProtoReflect.Descriptor instead.
func (*ObjectManifest) GetChunks ¶
func (x *ObjectManifest) GetChunks() []*ObjectManifest_ChunkWithOffset
func (*ObjectManifest) GetHash ¶
func (x *ObjectManifest) GetHash() []byte
func (*ObjectManifest) ProtoMessage ¶
func (*ObjectManifest) ProtoMessage()
func (*ObjectManifest) ProtoReflect ¶
func (x *ObjectManifest) ProtoReflect() protoreflect.Message
func (*ObjectManifest) Reset ¶
func (x *ObjectManifest) Reset()
func (*ObjectManifest) String ¶
func (x *ObjectManifest) String() string
type ObjectManifest_ChunkWithOffset ¶
type ObjectManifest_ChunkWithOffset struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*ObjectManifest_ChunkWithOffset) Descriptor
deprecated
func (*ObjectManifest_ChunkWithOffset) Descriptor() ([]byte, []int)
Deprecated: Use ObjectManifest_ChunkWithOffset.ProtoReflect.Descriptor instead.
func (*ObjectManifest_ChunkWithOffset) GetHash ¶
func (x *ObjectManifest_ChunkWithOffset) GetHash() []byte
func (*ObjectManifest_ChunkWithOffset) GetOffset ¶
func (x *ObjectManifest_ChunkWithOffset) GetOffset() int64
func (*ObjectManifest_ChunkWithOffset) GetSize ¶
func (x *ObjectManifest_ChunkWithOffset) GetSize() int64
func (*ObjectManifest_ChunkWithOffset) ProtoMessage ¶
func (*ObjectManifest_ChunkWithOffset) ProtoMessage()
func (*ObjectManifest_ChunkWithOffset) ProtoReflect ¶
func (x *ObjectManifest_ChunkWithOffset) ProtoReflect() protoreflect.Message
func (*ObjectManifest_ChunkWithOffset) Reset ¶
func (x *ObjectManifest_ChunkWithOffset) Reset()
func (*ObjectManifest_ChunkWithOffset) String ¶
func (x *ObjectManifest_ChunkWithOffset) String() string
type ObjectServer ¶
type ObjectServer interface { Fetch(context.Context, *wrappers.BytesValue) (*ObjectManifest, error) Push(context.Context, *ObjectManifest) (*empty.Empty, error) // contains filtered or unexported methods }
ObjectServer is the server API for Object service. All implementations must embed UnimplementedObjectServer for forward compatibility
type UnimplementedObjectServer ¶
type UnimplementedObjectServer struct { }
UnimplementedObjectServer must be embedded to have forward compatible implementations.
func (UnimplementedObjectServer) Fetch ¶
func (UnimplementedObjectServer) Fetch(context.Context, *wrappers.BytesValue) (*ObjectManifest, error)
func (UnimplementedObjectServer) Push ¶
func (UnimplementedObjectServer) Push(context.Context, *ObjectManifest) (*empty.Empty, error)
type UnsafeObjectServer ¶
type UnsafeObjectServer interface {
// contains filtered or unexported methods
}
UnsafeObjectServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ObjectServer will result in compilation errors.