bcgrpc

package
v0.0.0-...-817062f Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Blobcache_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blobcache.Blobcache",
	HandlerType: (*BlobcacheServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateDir",
			Handler:    _Blobcache_CreateDir_Handler,
		},
		{
			MethodName: "Open",
			Handler:    _Blobcache_Open_Handler,
		},
		{
			MethodName: "DeleteEntry",
			Handler:    _Blobcache_DeleteEntry_Handler,
		},
		{
			MethodName: "CreatePinSet",
			Handler:    _Blobcache_CreatePinSet_Handler,
		},
		{
			MethodName: "GetPinSet",
			Handler:    _Blobcache_GetPinSet_Handler,
		},
		{
			MethodName: "Post",
			Handler:    _Blobcache_Post_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Blobcache_Get_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Blobcache_Add_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Blobcache_Delete_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Blobcache_List_Handler,
		},
		{
			MethodName: "WaitOK",
			Handler:    _Blobcache_WaitOK_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListEntries",
			Handler:       _Blobcache_ListEntries_Handler,
			ServerStreams: 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 NewClient

func NewClient(c BlobcacheClient) blobcache.Service

func RegisterBlobcacheServer

func RegisterBlobcacheServer(s grpc.ServiceRegistrar, srv BlobcacheServer)

Types

type AddReq

type AddReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Id     []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AddReq) Descriptor deprecated

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

Deprecated: Use AddReq.ProtoReflect.Descriptor instead.

func (*AddReq) GetHandle

func (x *AddReq) GetHandle() string

func (*AddReq) GetId

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

func (*AddReq) ProtoMessage

func (*AddReq) ProtoMessage()

func (*AddReq) ProtoReflect

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

func (*AddReq) Reset

func (x *AddReq) Reset()

func (*AddReq) String

func (x *AddReq) String() string

type BlobcacheClient

type BlobcacheClient interface {
	// CreateDir creates a directory at name under the parent.
	CreateDir(ctx context.Context, in *CreateDirReq, opts ...grpc.CallOption) (*HandleRes, error)
	// Open resolves a path relative to a handle
	Open(ctx context.Context, in *OpenReq, opts ...grpc.CallOption) (*HandleRes, error)
	// DeleteEntry removes the entry with name from its parent.
	DeleteEntry(ctx context.Context, in *DeleteEntryReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ListEntries lists the entries under a parent.
	ListEntries(ctx context.Context, in *ListEntriesReq, opts ...grpc.CallOption) (Blobcache_ListEntriesClient, error)
	// CreatePinSet creates a PinSet at name under the parent.
	CreatePinSet(ctx context.Context, in *CreatePinSetReq, opts ...grpc.CallOption) (*HandleRes, error)
	// GetPinSet returns information about a PinSet
	GetPinSet(ctx context.Context, in *GetPinSetReq, opts ...grpc.CallOption) (*PinSet, error)
	// Post uploads data and adds it to a PinSet.
	Post(ctx context.Context, in *PostReq, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error)
	// Get retrieves data from a PinSet and returns.
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*wrapperspb.BytesValue, error)
	// Add adds data by ID to a PinSet.
	Add(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Delete removes data from a PinSet
	Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// List lists blobs by ID in a PinSet
	List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListRes, error)
	// WaitOK
	WaitOK(ctx context.Context, in *WaitReq, opts ...grpc.CallOption) (*emptypb.Empty, 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 {
	// CreateDir creates a directory at name under the parent.
	CreateDir(context.Context, *CreateDirReq) (*HandleRes, error)
	// Open resolves a path relative to a handle
	Open(context.Context, *OpenReq) (*HandleRes, error)
	// DeleteEntry removes the entry with name from its parent.
	DeleteEntry(context.Context, *DeleteEntryReq) (*emptypb.Empty, error)
	// ListEntries lists the entries under a parent.
	ListEntries(*ListEntriesReq, Blobcache_ListEntriesServer) error
	// CreatePinSet creates a PinSet at name under the parent.
	CreatePinSet(context.Context, *CreatePinSetReq) (*HandleRes, error)
	// GetPinSet returns information about a PinSet
	GetPinSet(context.Context, *GetPinSetReq) (*PinSet, error)
	// Post uploads data and adds it to a PinSet.
	Post(context.Context, *PostReq) (*wrapperspb.BytesValue, error)
	// Get retrieves data from a PinSet and returns.
	Get(context.Context, *GetReq) (*wrapperspb.BytesValue, error)
	// Add adds data by ID to a PinSet.
	Add(context.Context, *AddReq) (*emptypb.Empty, error)
	// Delete removes data from a PinSet
	Delete(context.Context, *DeleteReq) (*emptypb.Empty, error)
	// List lists blobs by ID in a PinSet
	List(context.Context, *ListReq) (*ListRes, error)
	// WaitOK
	WaitOK(context.Context, *WaitReq) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

BlobcacheServer is the server API for Blobcache service. All implementations must embed UnimplementedBlobcacheServer for forward compatibility

func NewServer

func NewServer(s blobcache.Service) BlobcacheServer

type Blobcache_ListEntriesClient

type Blobcache_ListEntriesClient interface {
	Recv() (*Entry, error)
	grpc.ClientStream
}

type Blobcache_ListEntriesServer

type Blobcache_ListEntriesServer interface {
	Send(*Entry) error
	grpc.ServerStream
}

type CreateDirReq

type CreateDirReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDirReq) Descriptor deprecated

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

Deprecated: Use CreateDirReq.ProtoReflect.Descriptor instead.

func (*CreateDirReq) GetHandle

func (x *CreateDirReq) GetHandle() string

func (*CreateDirReq) GetName

func (x *CreateDirReq) GetName() string

func (*CreateDirReq) ProtoMessage

func (*CreateDirReq) ProtoMessage()

func (*CreateDirReq) ProtoReflect

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

func (*CreateDirReq) Reset

func (x *CreateDirReq) Reset()

func (*CreateDirReq) String

func (x *CreateDirReq) String() string

type CreatePinSetReq

type CreatePinSetReq struct {
	Handle   string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Replicas uint32 `protobuf:"varint,3,opt,name=replicas,proto3" json:"replicas,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePinSetReq) Descriptor deprecated

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

Deprecated: Use CreatePinSetReq.ProtoReflect.Descriptor instead.

func (*CreatePinSetReq) GetHandle

func (x *CreatePinSetReq) GetHandle() string

func (*CreatePinSetReq) GetName

func (x *CreatePinSetReq) GetName() string

func (*CreatePinSetReq) GetReplicas

func (x *CreatePinSetReq) GetReplicas() uint32

func (*CreatePinSetReq) ProtoMessage

func (*CreatePinSetReq) ProtoMessage()

func (*CreatePinSetReq) ProtoReflect

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

func (*CreatePinSetReq) Reset

func (x *CreatePinSetReq) Reset()

func (*CreatePinSetReq) String

func (x *CreatePinSetReq) String() string

type DeleteEntryReq

type DeleteEntryReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Name   string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEntryReq) Descriptor deprecated

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

Deprecated: Use DeleteEntryReq.ProtoReflect.Descriptor instead.

func (*DeleteEntryReq) GetHandle

func (x *DeleteEntryReq) GetHandle() string

func (*DeleteEntryReq) GetName

func (x *DeleteEntryReq) GetName() string

func (*DeleteEntryReq) ProtoMessage

func (*DeleteEntryReq) ProtoMessage()

func (*DeleteEntryReq) ProtoReflect

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

func (*DeleteEntryReq) Reset

func (x *DeleteEntryReq) Reset()

func (*DeleteEntryReq) String

func (x *DeleteEntryReq) String() string

type DeleteReq

type DeleteReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Id     []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteReq) Descriptor deprecated

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

Deprecated: Use DeleteReq.ProtoReflect.Descriptor instead.

func (*DeleteReq) GetHandle

func (x *DeleteReq) GetHandle() string

func (*DeleteReq) GetId

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

func (*DeleteReq) ProtoMessage

func (*DeleteReq) ProtoMessage()

func (*DeleteReq) ProtoReflect

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

func (*DeleteReq) Reset

func (x *DeleteReq) Reset()

func (*DeleteReq) String

func (x *DeleteReq) String() string

type Entry

type Entry struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Oid  uint64 `protobuf:"varint,2,opt,name=oid,proto3" json:"oid,omitempty"`
	// contains filtered or unexported fields
}

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetName

func (x *Entry) GetName() string

func (*Entry) GetOid

func (x *Entry) GetOid() uint64

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type GetPinSetReq

type GetPinSetReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPinSetReq) Descriptor deprecated

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

Deprecated: Use GetPinSetReq.ProtoReflect.Descriptor instead.

func (*GetPinSetReq) GetHandle

func (x *GetPinSetReq) GetHandle() string

func (*GetPinSetReq) ProtoMessage

func (*GetPinSetReq) ProtoMessage()

func (*GetPinSetReq) ProtoReflect

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

func (*GetPinSetReq) Reset

func (x *GetPinSetReq) Reset()

func (*GetPinSetReq) String

func (x *GetPinSetReq) String() string

type GetReq

type GetReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Id     []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReq) Descriptor deprecated

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

Deprecated: Use GetReq.ProtoReflect.Descriptor instead.

func (*GetReq) GetHandle

func (x *GetReq) GetHandle() string

func (*GetReq) GetId

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

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) ProtoReflect

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

func (*GetReq) Reset

func (x *GetReq) Reset()

func (*GetReq) String

func (x *GetReq) String() string

type HandleRes

type HandleRes struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	// contains filtered or unexported fields
}

func (*HandleRes) Descriptor deprecated

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

Deprecated: Use HandleRes.ProtoReflect.Descriptor instead.

func (*HandleRes) GetHandle

func (x *HandleRes) GetHandle() string

func (*HandleRes) ProtoMessage

func (*HandleRes) ProtoMessage()

func (*HandleRes) ProtoReflect

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

func (*HandleRes) Reset

func (x *HandleRes) Reset()

func (*HandleRes) String

func (x *HandleRes) String() string

type ListEntriesReq

type ListEntriesReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	// contains filtered or unexported fields
}

func (*ListEntriesReq) Descriptor deprecated

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

Deprecated: Use ListEntriesReq.ProtoReflect.Descriptor instead.

func (*ListEntriesReq) GetHandle

func (x *ListEntriesReq) GetHandle() string

func (*ListEntriesReq) ProtoMessage

func (*ListEntriesReq) ProtoMessage()

func (*ListEntriesReq) ProtoReflect

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

func (*ListEntriesReq) Reset

func (x *ListEntriesReq) Reset()

func (*ListEntriesReq) String

func (x *ListEntriesReq) String() string

type ListReq

type ListReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	First  []byte `protobuf:"bytes,2,opt,name=first,proto3" json:"first,omitempty"`
	Limit  uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReq) Descriptor deprecated

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

Deprecated: Use ListReq.ProtoReflect.Descriptor instead.

func (*ListReq) GetFirst

func (x *ListReq) GetFirst() []byte

func (*ListReq) GetHandle

func (x *ListReq) GetHandle() string

func (*ListReq) GetLimit

func (x *ListReq) GetLimit() uint32

func (*ListReq) ProtoMessage

func (*ListReq) ProtoMessage()

func (*ListReq) ProtoReflect

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

func (*ListReq) Reset

func (x *ListReq) Reset()

func (*ListReq) String

func (x *ListReq) String() string

type ListRes

type ListRes struct {
	Ids [][]byte `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRes) Descriptor deprecated

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

Deprecated: Use ListRes.ProtoReflect.Descriptor instead.

func (*ListRes) GetIds

func (x *ListRes) GetIds() [][]byte

func (*ListRes) ProtoMessage

func (*ListRes) ProtoMessage()

func (*ListRes) ProtoReflect

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

func (*ListRes) Reset

func (x *ListRes) Reset()

func (*ListRes) String

func (x *ListRes) String() string

type OpenReq

type OpenReq struct {
	Handle string   `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Path   []string `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*OpenReq) Descriptor deprecated

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

Deprecated: Use OpenReq.ProtoReflect.Descriptor instead.

func (*OpenReq) GetHandle

func (x *OpenReq) GetHandle() string

func (*OpenReq) GetPath

func (x *OpenReq) GetPath() []string

func (*OpenReq) ProtoMessage

func (*OpenReq) ProtoMessage()

func (*OpenReq) ProtoReflect

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

func (*OpenReq) Reset

func (x *OpenReq) Reset()

func (*OpenReq) String

func (x *OpenReq) String() string

type PinSet

type PinSet struct {
	// contains filtered or unexported fields
}

func (*PinSet) Descriptor deprecated

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

Deprecated: Use PinSet.ProtoReflect.Descriptor instead.

func (*PinSet) ProtoMessage

func (*PinSet) ProtoMessage()

func (*PinSet) ProtoReflect

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

func (*PinSet) Reset

func (x *PinSet) Reset()

func (*PinSet) String

func (x *PinSet) String() string

type PostReq

type PostReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PostReq) Descriptor deprecated

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

Deprecated: Use PostReq.ProtoReflect.Descriptor instead.

func (*PostReq) GetData

func (x *PostReq) GetData() []byte

func (*PostReq) GetHandle

func (x *PostReq) GetHandle() string

func (*PostReq) ProtoMessage

func (*PostReq) ProtoMessage()

func (*PostReq) ProtoReflect

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

func (*PostReq) Reset

func (x *PostReq) Reset()

func (*PostReq) String

func (x *PostReq) String() string

type UnimplementedBlobcacheServer

type UnimplementedBlobcacheServer struct {
}

UnimplementedBlobcacheServer must be embedded to have forward compatible implementations.

func (UnimplementedBlobcacheServer) Add

func (UnimplementedBlobcacheServer) CreateDir

func (UnimplementedBlobcacheServer) CreatePinSet

func (UnimplementedBlobcacheServer) Delete

func (UnimplementedBlobcacheServer) DeleteEntry

func (UnimplementedBlobcacheServer) Get

func (UnimplementedBlobcacheServer) GetPinSet

func (UnimplementedBlobcacheServer) List

func (UnimplementedBlobcacheServer) ListEntries

func (UnimplementedBlobcacheServer) Open

func (UnimplementedBlobcacheServer) Post

func (UnimplementedBlobcacheServer) WaitOK

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.

type WaitReq

type WaitReq struct {
	Handle string `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"`
	// contains filtered or unexported fields
}

func (*WaitReq) Descriptor deprecated

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

Deprecated: Use WaitReq.ProtoReflect.Descriptor instead.

func (*WaitReq) GetHandle

func (x *WaitReq) GetHandle() string

func (*WaitReq) ProtoMessage

func (*WaitReq) ProtoMessage()

func (*WaitReq) ProtoReflect

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

func (*WaitReq) Reset

func (x *WaitReq) Reset()

func (*WaitReq) String

func (x *WaitReq) String() string

Jump to

Keyboard shortcuts

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