Documentation ¶
Index ¶
- func NewDiscardWriteCloser() *discardWriteCloser
- type ByteStreamServer
- func (s *ByteStreamServer) QueryWriteStatus(ctx context.Context, req *bspb.QueryWriteStatusRequest) (*bspb.QueryWriteStatusResponse, error)
- func (s *ByteStreamServer) Read(req *bspb.ReadRequest, stream bspb.ByteStream_ReadServer) error
- func (s *ByteStreamServer) Write(stream bspb.ByteStream_WriteServer) error
- type StreamWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscardWriteCloser ¶
func NewDiscardWriteCloser() *discardWriteCloser
Types ¶
type ByteStreamServer ¶
type ByteStreamServer struct {
// contains filtered or unexported fields
}
func NewByteStreamServer ¶
func NewByteStreamServer(env environment.Env) (*ByteStreamServer, error)
func (*ByteStreamServer) QueryWriteStatus ¶
func (s *ByteStreamServer) QueryWriteStatus(ctx context.Context, req *bspb.QueryWriteStatusRequest) (*bspb.QueryWriteStatusResponse, error)
`QueryWriteStatus()` is used to find the `committed_size` for a resource that is being written, which can then be used as the `write_offset` for the next `Write()` call.
If the resource does not exist (i.e., the resource has been deleted, or the first `Write()` has not yet reached the service), this method the error `NOT_FOUND`.
The client **may** call `QueryWriteStatus()` at any time to determine how much data has been processed for this resource. This is useful if the client is buffering data and needs to know which data can be safely evicted. For any sequence of `QueryWriteStatus()` calls for a given resource name, the sequence of returned `committed_size` values will be non-decreasing.
func (*ByteStreamServer) Read ¶
func (s *ByteStreamServer) Read(req *bspb.ReadRequest, stream bspb.ByteStream_ReadServer) error
`Read()` is used to retrieve the contents of a resource as a sequence of bytes. The bytes are returned in a sequence of responses, and the responses are delivered as the results of a server-side streaming FUNC (S *BYTESTREAMSERVER).
func (*ByteStreamServer) Write ¶
func (s *ByteStreamServer) Write(stream bspb.ByteStream_WriteServer) error
type StreamWriter ¶
type StreamWriter struct {
// contains filtered or unexported fields
}