pb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0, BSD-3-Clause, 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: "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 (*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 (*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 {
	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) 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