Documentation ¶
Overview ¶
Package tofu is a generated protocol buffer package.
It is generated from these files:
proto/block.proto proto/common.proto proto/volume.proto
It has these top-level messages:
Block Blocks BytesValue EmptyValue File FileInfo
Index ¶
- Variables
- func RegisterBlockStoreServer(s *grpc.Server, srv BlockStoreServer)
- func RegisterVolumeStoreServer(s *grpc.Server, srv VolumeStoreServer)
- type Block
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) Marshal() (data []byte, err error)
- func (m *Block) MarshalTo(data []byte) (int, error)
- func (*Block) ProtoMessage()
- func (m *Block) Reset()
- func (m *Block) Size() (n int)
- func (m *Block) String() string
- func (m *Block) Unmarshal(data []byte) error
- type BlockStoreClient
- type BlockStoreServer
- type BlockStore_GetBlockClient
- type BlockStore_GetBlockServer
- type BlockStore_ListBlocksClient
- type BlockStore_ListBlocksServer
- type BlockStore_PutBlockClient
- type BlockStore_PutBlockServer
- type Blocks
- func (*Blocks) Descriptor() ([]byte, []int)
- func (m *Blocks) GetBlock() []*Block
- func (m *Blocks) Marshal() (data []byte, err error)
- func (m *Blocks) MarshalTo(data []byte) (int, error)
- func (*Blocks) ProtoMessage()
- func (m *Blocks) Reset()
- func (m *Blocks) Size() (n int)
- func (m *Blocks) String() string
- func (m *Blocks) Unmarshal(data []byte) error
- type BytesValue
- type EmptyValue
- type File
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)
- func (m *FileInfo) GetBlocks() *Blocks
- func (m *FileInfo) GetFile() *File
- func (m *FileInfo) Marshal() (data []byte, err error)
- func (m *FileInfo) MarshalTo(data []byte) (int, error)
- func (*FileInfo) ProtoMessage()
- func (m *FileInfo) Reset()
- func (m *FileInfo) Size() (n int)
- func (m *FileInfo) String() string
- func (m *FileInfo) Unmarshal(data []byte) error
- type VolumeStoreClient
- type VolumeStoreServer
- type VolumeStore_ListFilesClient
- type VolumeStore_ListFilesServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow") )
View Source
var ( ErrInvalidLengthVolume = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVolume = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterBlockStoreServer ¶
func RegisterBlockStoreServer(s *grpc.Server, srv BlockStoreServer)
func RegisterVolumeStoreServer ¶
func RegisterVolumeStoreServer(s *grpc.Server, srv VolumeStoreServer)
Types ¶
type Block ¶
type Block struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}
func (*Block) Descriptor ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
type BlockStoreClient ¶
type BlockStoreClient interface { GetBlock(ctx context.Context, in *Block, opts ...grpc.CallOption) (BlockStore_GetBlockClient, error) PutBlock(ctx context.Context, opts ...grpc.CallOption) (BlockStore_PutBlockClient, error) ListBlocks(ctx context.Context, in *EmptyValue, opts ...grpc.CallOption) (BlockStore_ListBlocksClient, error) }
func NewBlockStoreClient ¶
func NewBlockStoreClient(cc *grpc.ClientConn) BlockStoreClient
type BlockStoreServer ¶
type BlockStoreServer interface { GetBlock(*Block, BlockStore_GetBlockServer) error PutBlock(BlockStore_PutBlockServer) error ListBlocks(*EmptyValue, BlockStore_ListBlocksServer) error }
type BlockStore_GetBlockClient ¶
type BlockStore_GetBlockClient interface { Recv() (*BytesValue, error) grpc.ClientStream }
type BlockStore_GetBlockServer ¶
type BlockStore_GetBlockServer interface { Send(*BytesValue) error grpc.ServerStream }
type BlockStore_ListBlocksClient ¶
type BlockStore_ListBlocksClient interface { Recv() (*Block, error) grpc.ClientStream }
type BlockStore_ListBlocksServer ¶
type BlockStore_ListBlocksServer interface { Send(*Block) error grpc.ServerStream }
type BlockStore_PutBlockClient ¶
type BlockStore_PutBlockClient interface { Send(*BytesValue) error CloseAndRecv() (*Block, error) grpc.ClientStream }
type BlockStore_PutBlockServer ¶
type BlockStore_PutBlockServer interface { SendAndClose(*Block) error Recv() (*BytesValue, error) grpc.ServerStream }
type Blocks ¶
type Blocks struct {
Block []*Block `protobuf:"bytes,1,rep,name=block" json:"block,omitempty"`
}
func (*Blocks) Descriptor ¶
func (*Blocks) ProtoMessage ¶
func (*Blocks) ProtoMessage()
type BytesValue ¶
type BytesValue struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (*BytesValue) Descriptor ¶
func (*BytesValue) Descriptor() ([]byte, []int)
func (*BytesValue) ProtoMessage ¶
func (*BytesValue) ProtoMessage()
func (*BytesValue) Reset ¶
func (m *BytesValue) Reset()
func (*BytesValue) String ¶
func (m *BytesValue) String() string
type EmptyValue ¶
type EmptyValue struct { }
func (*EmptyValue) Descriptor ¶
func (*EmptyValue) Descriptor() ([]byte, []int)
func (*EmptyValue) ProtoMessage ¶
func (*EmptyValue) ProtoMessage()
func (*EmptyValue) Reset ¶
func (m *EmptyValue) Reset()
func (*EmptyValue) String ¶
func (m *EmptyValue) String() string
type File ¶
type File struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
}
func (*File) Descriptor ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
type FileInfo ¶
type FileInfo struct { File *File `protobuf:"bytes,1,opt,name=file" json:"file,omitempty"` Blocks *Blocks `protobuf:"bytes,2,opt,name=blocks" json:"blocks,omitempty"` }
func (*FileInfo) Descriptor ¶
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
type VolumeStoreClient ¶
type VolumeStoreClient interface { GetFile(ctx context.Context, in *File, opts ...grpc.CallOption) (*FileInfo, error) PutFile(ctx context.Context, in *FileInfo, opts ...grpc.CallOption) (*FileInfo, error) ListFiles(ctx context.Context, in *EmptyValue, opts ...grpc.CallOption) (VolumeStore_ListFilesClient, error) }
func NewVolumeStoreClient ¶
func NewVolumeStoreClient(cc *grpc.ClientConn) VolumeStoreClient
type VolumeStoreServer ¶
type VolumeStore_ListFilesClient ¶
type VolumeStore_ListFilesClient interface { Recv() (*FileInfo, error) grpc.ClientStream }
type VolumeStore_ListFilesServer ¶
type VolumeStore_ListFilesServer interface { Send(*FileInfo) error grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.