Documentation ¶
Overview ¶
Package streambigfile is a generated protocol buffer package.
It is generated from these files:
sbf.proto
It has these top-level messages:
BigFileChunk BigFileAck
Index ¶
- Variables
- func RegisterPeerServer(s *grpc.Server, srv PeerServer)
- type BigFileAck
- func (*BigFileAck) Descriptor() ([]byte, []int)
- func (m *BigFileAck) GetErr() string
- func (m *BigFileAck) GetFilepath() string
- func (m *BigFileAck) GetRecvTime() uint64
- func (m *BigFileAck) GetSizeInBytes() int64
- func (m *BigFileAck) GetWholeFileBlake2B() []byte
- func (m *BigFileAck) Marshal() (dAtA []byte, err error)
- func (m *BigFileAck) MarshalTo(dAtA []byte) (int, error)
- func (*BigFileAck) ProtoMessage()
- func (m *BigFileAck) Reset()
- func (m *BigFileAck) Size() (n int)
- func (m *BigFileAck) String() string
- func (m *BigFileAck) Unmarshal(dAtA []byte) error
- type BigFileChunk
- func (*BigFileChunk) Descriptor() ([]byte, []int)
- func (m *BigFileChunk) GetBlake2B() []byte
- func (m *BigFileChunk) GetBlake2BCumulative() []byte
- func (m *BigFileChunk) GetChunkNumber() int64
- func (m *BigFileChunk) GetData() []byte
- func (m *BigFileChunk) GetFilepath() string
- func (m *BigFileChunk) GetIsBcastSet() bool
- func (m *BigFileChunk) GetIsLastChunk() bool
- func (m *BigFileChunk) GetOriginalStartSendTime() uint64
- func (m *BigFileChunk) GetSendTime() uint64
- func (m *BigFileChunk) GetSizeInBytes() int64
- func (m *BigFileChunk) Marshal() (dAtA []byte, err error)
- func (m *BigFileChunk) MarshalTo(dAtA []byte) (int, error)
- func (*BigFileChunk) ProtoMessage()
- func (m *BigFileChunk) Reset()
- func (m *BigFileChunk) Size() (n int)
- func (m *BigFileChunk) String() string
- func (m *BigFileChunk) Unmarshal(dAtA []byte) error
- type PeerClient
- type PeerServer
- type Peer_SendFileClient
- type Peer_SendFileServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthSbf = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSbf = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterPeerServer ¶
func RegisterPeerServer(s *grpc.Server, srv PeerServer)
Types ¶
type BigFileAck ¶
type BigFileAck struct { Filepath string `protobuf:"bytes,1,opt,name=Filepath,json=filepath,proto3" json:"Filepath,omitempty"` SizeInBytes int64 `protobuf:"varint,2,opt,name=SizeInBytes,json=sizeInBytes,proto3" json:"SizeInBytes,omitempty"` RecvTime uint64 `protobuf:"fixed64,3,opt,name=RecvTime,json=recvTime,proto3" json:"RecvTime,omitempty"` WholeFileBlake2B []byte `protobuf:"bytes,4,opt,name=WholeFileBlake2B,json=wholeFileBlake2B,proto3" json:"WholeFileBlake2B,omitempty"` Err string `protobuf:"bytes,5,opt,name=Err,json=err,proto3" json:"Err,omitempty"` }
func (*BigFileAck) Descriptor ¶
func (*BigFileAck) Descriptor() ([]byte, []int)
func (*BigFileAck) GetErr ¶
func (m *BigFileAck) GetErr() string
func (*BigFileAck) GetFilepath ¶
func (m *BigFileAck) GetFilepath() string
func (*BigFileAck) GetRecvTime ¶
func (m *BigFileAck) GetRecvTime() uint64
func (*BigFileAck) GetSizeInBytes ¶
func (m *BigFileAck) GetSizeInBytes() int64
func (*BigFileAck) GetWholeFileBlake2B ¶
func (m *BigFileAck) GetWholeFileBlake2B() []byte
func (*BigFileAck) Marshal ¶
func (m *BigFileAck) Marshal() (dAtA []byte, err error)
func (*BigFileAck) ProtoMessage ¶
func (*BigFileAck) ProtoMessage()
func (*BigFileAck) Reset ¶
func (m *BigFileAck) Reset()
func (*BigFileAck) Size ¶
func (m *BigFileAck) Size() (n int)
func (*BigFileAck) String ¶
func (m *BigFileAck) String() string
func (*BigFileAck) Unmarshal ¶
func (m *BigFileAck) Unmarshal(dAtA []byte) error
type BigFileChunk ¶
type BigFileChunk struct { // Filepath is just an arbitrary // name for this file. Filepath string `protobuf:"bytes,1,opt,name=Filepath,json=filepath,proto3" json:"Filepath,omitempty"` // SizeInBytes should match // len(Data) exactly. SizeInBytes int64 `protobuf:"varint,2,opt,name=SizeInBytes,json=sizeInBytes,proto3" json:"SizeInBytes,omitempty"` // According to the sender's clock, // when did this chunk get put // on the wire? SendTime uint64 `protobuf:"fixed64,3,opt,name=SendTime,json=sendTime,proto3" json:"SendTime,omitempty"` OriginalStartSendTime uint64 `protobuf:"fixed64,10,opt,name=OriginalStartSendTime,json=originalStartSendTime,proto3" json:"OriginalStartSendTime,omitempty"` // Blake2B checksum of Data. Blake2B []byte `protobuf:"bytes,4,opt,name=Blake2B,json=blake2B,proto3" json:"Blake2B,omitempty"` // Cumulative Blake2B of all // Chunks of the file, up to // and including this one. Blake2BCumulative []byte `protobuf:"bytes,5,opt,name=Blake2BCumulative,json=blake2BCumulative,proto3" json:"Blake2BCumulative,omitempty"` // How big can Data be? I // recommend no more than 1MB. // I suggest 1MB chunking to be // on the safe side. Above // 2MB, I observe that gRPC // starts to return EOF instead // of conveying the messages. // // Fields Data and Blake2B are // for just a single chunk. Data []byte `protobuf:"bytes,6,opt,name=Data,json=data,proto3" json:"Data,omitempty"` // gRPC guarantees in-order delivery // of the stream, so ChunkNumber may // seem unnecessary. It is still // useful for/as a delivery progress // meter. ChunkNumber int64 `protobuf:"varint,7,opt,name=ChunkNumber,json=chunkNumber,proto3" json:"ChunkNumber,omitempty"` // Be sure to set IsLastChunk to true // if this is the last chunk. IsLastChunk bool `protobuf:"varint,8,opt,name=IsLastChunk,json=isLastChunk,proto3" json:"IsLastChunk,omitempty"` // IsBcastSetRequest? (else by default it is a BcastGetReply) IsBcastSet bool `protobuf:"varint,9,opt,name=IsBcastSet,json=isBcastSet,proto3" json:"IsBcastSet,omitempty"` }
func (*BigFileChunk) Descriptor ¶
func (*BigFileChunk) Descriptor() ([]byte, []int)
func (*BigFileChunk) GetBlake2B ¶
func (m *BigFileChunk) GetBlake2B() []byte
func (*BigFileChunk) GetBlake2BCumulative ¶
func (m *BigFileChunk) GetBlake2BCumulative() []byte
func (*BigFileChunk) GetChunkNumber ¶
func (m *BigFileChunk) GetChunkNumber() int64
func (*BigFileChunk) GetData ¶
func (m *BigFileChunk) GetData() []byte
func (*BigFileChunk) GetFilepath ¶
func (m *BigFileChunk) GetFilepath() string
func (*BigFileChunk) GetIsBcastSet ¶
func (m *BigFileChunk) GetIsBcastSet() bool
func (*BigFileChunk) GetIsLastChunk ¶
func (m *BigFileChunk) GetIsLastChunk() bool
func (*BigFileChunk) GetOriginalStartSendTime ¶
func (m *BigFileChunk) GetOriginalStartSendTime() uint64
func (*BigFileChunk) GetSendTime ¶
func (m *BigFileChunk) GetSendTime() uint64
func (*BigFileChunk) GetSizeInBytes ¶
func (m *BigFileChunk) GetSizeInBytes() int64
func (*BigFileChunk) Marshal ¶
func (m *BigFileChunk) Marshal() (dAtA []byte, err error)
func (*BigFileChunk) ProtoMessage ¶
func (*BigFileChunk) ProtoMessage()
func (*BigFileChunk) Reset ¶
func (m *BigFileChunk) Reset()
func (*BigFileChunk) Size ¶
func (m *BigFileChunk) Size() (n int)
func (*BigFileChunk) String ¶
func (m *BigFileChunk) String() string
func (*BigFileChunk) Unmarshal ¶
func (m *BigFileChunk) Unmarshal(dAtA []byte) error
type PeerClient ¶
type PeerClient interface { // client always sends a big file to the server. SendFile(ctx context.Context, opts ...grpc.CallOption) (Peer_SendFileClient, error) }
func NewPeerClient ¶
func NewPeerClient(cc *grpc.ClientConn) PeerClient
type PeerServer ¶
type PeerServer interface { // client always sends a big file to the server. SendFile(Peer_SendFileServer) error }
type Peer_SendFileClient ¶
type Peer_SendFileClient interface { Send(*BigFileChunk) error CloseAndRecv() (*BigFileAck, error) grpc.ClientStream }
type Peer_SendFileServer ¶
type Peer_SendFileServer interface { SendAndClose(*BigFileAck) error Recv() (*BigFileChunk, error) grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.