proto

package
v0.0.0-...-424e234 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlobCache_GetContent_FullMethodName   = "/blobcache.BlobCache/GetContent"
	BlobCache_StoreContent_FullMethodName = "/blobcache.BlobCache/StoreContent"
)

Variables

View Source
var BlobCache_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blobcache.BlobCache",
	HandlerType: (*BlobCacheServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetContent",
			Handler:    _BlobCache_GetContent_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StoreContent",
			Handler:       _BlobCache_StoreContent_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "blobcache.proto",
}

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

View Source
var File_blobcache_proto protoreflect.FileDescriptor

Functions

func RegisterBlobCacheServer

func RegisterBlobCacheServer(s grpc.ServiceRegistrar, srv BlobCacheServer)

Types

type BlobCacheClient

type BlobCacheClient interface {
	GetContent(ctx context.Context, in *GetContentRequest, opts ...grpc.CallOption) (*GetContentResponse, error)
	StoreContent(ctx context.Context, opts ...grpc.CallOption) (BlobCache_StoreContentClient, error)
}

BlobCacheClient is the client API for BlobCache 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 NewBlobCacheClient

func NewBlobCacheClient(cc grpc.ClientConnInterface) BlobCacheClient

type BlobCacheServer

type BlobCacheServer interface {
	GetContent(context.Context, *GetContentRequest) (*GetContentResponse, error)
	StoreContent(BlobCache_StoreContentServer) error
	// contains filtered or unexported methods
}

BlobCacheServer is the server API for BlobCache service. All implementations must embed UnimplementedBlobCacheServer for forward compatibility

type BlobCache_StoreContentClient

type BlobCache_StoreContentClient interface {
	Send(*StoreContentRequest) error
	CloseAndRecv() (*StoreContentResponse, error)
	grpc.ClientStream
}

type BlobCache_StoreContentServer

type BlobCache_StoreContentServer interface {
	SendAndClose(*StoreContentResponse) error
	Recv() (*StoreContentRequest, error)
	grpc.ServerStream
}

type GetContentRequest

type GetContentRequest struct {
	Hash   string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`      // Hash of the content to retrieve
	Offset int64  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // Offset into the content
	Length int64  `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` // Length of the content to retrieve
	// contains filtered or unexported fields
}

func (*GetContentRequest) Descriptor deprecated

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

Deprecated: Use GetContentRequest.ProtoReflect.Descriptor instead.

func (*GetContentRequest) GetHash

func (x *GetContentRequest) GetHash() string

func (*GetContentRequest) GetLength

func (x *GetContentRequest) GetLength() int64

func (*GetContentRequest) GetOffset

func (x *GetContentRequest) GetOffset() int64

func (*GetContentRequest) ProtoMessage

func (*GetContentRequest) ProtoMessage()

func (*GetContentRequest) ProtoReflect

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

func (*GetContentRequest) Reset

func (x *GetContentRequest) Reset()

func (*GetContentRequest) String

func (x *GetContentRequest) String() string

type GetContentResponse

type GetContentResponse struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Content data
	// contains filtered or unexported fields
}

func (*GetContentResponse) Descriptor deprecated

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

Deprecated: Use GetContentResponse.ProtoReflect.Descriptor instead.

func (*GetContentResponse) GetContent

func (x *GetContentResponse) GetContent() []byte

func (*GetContentResponse) ProtoMessage

func (*GetContentResponse) ProtoMessage()

func (*GetContentResponse) ProtoReflect

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

func (*GetContentResponse) Reset

func (x *GetContentResponse) Reset()

func (*GetContentResponse) String

func (x *GetContentResponse) String() string

type StoreContentRequest

type StoreContentRequest struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // Content data to store
	// contains filtered or unexported fields
}

func (*StoreContentRequest) Descriptor deprecated

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

Deprecated: Use StoreContentRequest.ProtoReflect.Descriptor instead.

func (*StoreContentRequest) GetContent

func (x *StoreContentRequest) GetContent() []byte

func (*StoreContentRequest) ProtoMessage

func (*StoreContentRequest) ProtoMessage()

func (*StoreContentRequest) ProtoReflect

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

func (*StoreContentRequest) Reset

func (x *StoreContentRequest) Reset()

func (*StoreContentRequest) String

func (x *StoreContentRequest) String() string

type StoreContentResponse

type StoreContentResponse struct {
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Hash of the stored content
	// contains filtered or unexported fields
}

func (*StoreContentResponse) Descriptor deprecated

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

Deprecated: Use StoreContentResponse.ProtoReflect.Descriptor instead.

func (*StoreContentResponse) GetHash

func (x *StoreContentResponse) GetHash() string

func (*StoreContentResponse) ProtoMessage

func (*StoreContentResponse) ProtoMessage()

func (*StoreContentResponse) ProtoReflect

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

func (*StoreContentResponse) Reset

func (x *StoreContentResponse) Reset()

func (*StoreContentResponse) String

func (x *StoreContentResponse) String() string

type UnimplementedBlobCacheServer

type UnimplementedBlobCacheServer struct {
}

UnimplementedBlobCacheServer must be embedded to have forward compatible implementations.

func (UnimplementedBlobCacheServer) GetContent

func (UnimplementedBlobCacheServer) StoreContent

type UnsafeBlobCacheServer

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

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

Jump to

Keyboard shortcuts

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