tofu

package
v0.0.0-...-dfdcac0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: Apache-2.0 Imports: 7 Imported by: 3

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

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) Descriptor() ([]byte, []int)

func (*Block) Marshal

func (m *Block) Marshal() (data []byte, err error)

func (*Block) MarshalTo

func (m *Block) MarshalTo(data []byte) (int, error)

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) Size

func (m *Block) Size() (n int)

func (*Block) String

func (m *Block) String() string

func (*Block) Unmarshal

func (m *Block) Unmarshal(data []byte) error

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) Descriptor() ([]byte, []int)

func (*Blocks) GetBlock

func (m *Blocks) GetBlock() []*Block

func (*Blocks) Marshal

func (m *Blocks) Marshal() (data []byte, err error)

func (*Blocks) MarshalTo

func (m *Blocks) MarshalTo(data []byte) (int, error)

func (*Blocks) ProtoMessage

func (*Blocks) ProtoMessage()

func (*Blocks) Reset

func (m *Blocks) Reset()

func (*Blocks) Size

func (m *Blocks) Size() (n int)

func (*Blocks) String

func (m *Blocks) String() string

func (*Blocks) Unmarshal

func (m *Blocks) Unmarshal(data []byte) error

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) Descriptor() ([]byte, []int)

func (*File) Marshal

func (m *File) Marshal() (data []byte, err error)

func (*File) MarshalTo

func (m *File) MarshalTo(data []byte) (int, error)

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) Size

func (m *File) Size() (n int)

func (*File) String

func (m *File) String() string

func (*File) Unmarshal

func (m *File) Unmarshal(data []byte) error

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) Descriptor() ([]byte, []int)

func (*FileInfo) GetBlocks

func (m *FileInfo) GetBlocks() *Blocks

func (*FileInfo) GetFile

func (m *FileInfo) GetFile() *File

func (*FileInfo) Marshal

func (m *FileInfo) Marshal() (data []byte, err error)

func (*FileInfo) MarshalTo

func (m *FileInfo) MarshalTo(data []byte) (int, error)

func (*FileInfo) ProtoMessage

func (*FileInfo) ProtoMessage()

func (*FileInfo) Reset

func (m *FileInfo) Reset()

func (*FileInfo) Size

func (m *FileInfo) Size() (n int)

func (*FileInfo) String

func (m *FileInfo) String() string

func (*FileInfo) Unmarshal

func (m *FileInfo) Unmarshal(data []byte) error

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 VolumeStoreServer interface {
	GetFile(context.Context, *File) (*FileInfo, error)
	PutFile(context.Context, *FileInfo) (*FileInfo, error)
	ListFiles(*EmptyValue, VolumeStore_ListFilesServer) error
}

type VolumeStore_ListFilesClient

type VolumeStore_ListFilesClient interface {
	Recv() (*FileInfo, error)
	grpc.ClientStream
}

type VolumeStore_ListFilesServer

type VolumeStore_ListFilesServer interface {
	Send(*FileInfo) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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