Documentation
¶
Index ¶
- func NewBin(size int64, opener sts.Open, renamer sts.Rename) sts.Payload
- func NewDecoder(n int, sep string, r io.Reader) (sts.PayloadDecoder, error)
- type Bin
- func (bin *Bin) Add(chunk sts.Binnable) (added bool)
- func (bin *Bin) EncodeHeader() (byteMeta []byte, err error)
- func (bin *Bin) GetCompleted() time.Time
- func (bin *Bin) GetEncoder() io.ReadCloser
- func (bin *Bin) GetParts() []sts.Binned
- func (bin *Bin) GetSize() int64
- func (bin *Bin) GetStarted() time.Time
- func (bin *Bin) IsFull() bool
- func (bin *Bin) Remove(binned sts.Binned)
- func (bin *Bin) Split(n int) sts.Payload
- type Decoder
- type Encoder
- type PartDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
NewDecoder expects the number of bytes devoted to the metadata array and the path delimeter string as inputs
Types ¶
type Bin ¶
type Bin struct {
// contains filtered or unexported fields
}
Bin is the struct for managing the chunk of data sent in a single request
func (*Bin) Add ¶
Add adds what it can of the input Binnable to the bin. Returns false if no bytes were added.
func (*Bin) EncodeHeader ¶
EncodeHeader returns a byte-array encoding of the metadata for this payload
func (*Bin) GetCompleted ¶
GetCompleted returns the time this bin was marked "done"
func (*Bin) GetEncoder ¶
func (bin *Bin) GetEncoder() io.ReadCloser
GetEncoder returns an io.Reader for reading the bin content
func (*Bin) GetStarted ¶
GetStarted returns the time this bin started to be read
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is responsible for parsing "bin" requests on the receiving end
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder is the struct that manages writing a bin
type PartDecoder ¶
type PartDecoder struct {
// contains filtered or unexported fields
}
PartDecoder is responsible for parsing individual "parts" of "bin" requests