pb

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0, MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_chunky_proto protoreflect.FileDescriptor
View Source
var Object_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "offloaded.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 ChunkManifest added in v0.5.0

type ChunkManifest struct {
	Id   []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Size int64  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*ChunkManifest) Descriptor deprecated added in v0.5.0

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

Deprecated: Use ChunkManifest.ProtoReflect.Descriptor instead.

func (*ChunkManifest) GetId added in v0.5.0

func (x *ChunkManifest) GetId() []byte

func (*ChunkManifest) GetSize added in v0.5.0

func (x *ChunkManifest) GetSize() int64

func (*ChunkManifest) ProtoMessage added in v0.5.0

func (*ChunkManifest) ProtoMessage()

func (*ChunkManifest) ProtoReflect added in v0.5.0

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

func (*ChunkManifest) Reset added in v0.5.0

func (x *ChunkManifest) Reset()

func (*ChunkManifest) String added in v0.5.0

func (x *ChunkManifest) String() string

type ObjectClient

type ObjectClient interface {
	// Fetches an object by its ID.
	Fetch(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*ObjectManifest, error)
	// Push stores an object.
	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 {
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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 (*ObjectManifest) GetId added in v0.3.0

func (x *ObjectManifest) GetId() []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 {
	Id     []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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) GetId added in v0.3.0

func (x *ObjectManifest_ChunkWithOffset) GetId() []byte

func (*ObjectManifest_ChunkWithOffset) GetOffset

func (x *ObjectManifest_ChunkWithOffset) GetOffset() int64

func (*ObjectManifest_ChunkWithOffset) GetSize

func (*ObjectManifest_ChunkWithOffset) ProtoMessage

func (*ObjectManifest_ChunkWithOffset) ProtoMessage()

func (*ObjectManifest_ChunkWithOffset) ProtoReflect

func (*ObjectManifest_ChunkWithOffset) Reset

func (x *ObjectManifest_ChunkWithOffset) Reset()

func (*ObjectManifest_ChunkWithOffset) String

type ObjectServer

type ObjectServer interface {
	// Fetches an object by its ID.
	Fetch(context.Context, *wrappers.BytesValue) (*ObjectManifest, error)
	// Push stores an object.
	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) Push

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.

Jump to

Keyboard shortcuts

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