Documentation ¶
Index ¶
- Variables
- type AbortReq
- type BasicReq
- type CloneReq
- type CloneResult
- type ClunkReq
- type ClunkResult
- type CompositeReq
- type CreateReq
- type CreateResult
- type File
- type FileSys
- type NonseqReq
- type NonseqResult
- type OpenReq
- type OpenResult
- type ReadReq
- type ReadResult
- type RemoveReq
- type RemoveResult
- type Req
- type Result
- type Sequence
- type Sequencer
- type StatReq
- type StatResult
- type StringResult
- type WalkReq
- type WalkResult
- type WriteReq
- type WriteResult
- type WstatReq
- type WstatResult
Constants ¶
This section is empty.
Variables ¶
var Eaborted = errors.New("sequence aborted")
Functions ¶
This section is empty.
Types ¶
type CloneResult ¶
type CloneResult struct{}
func (CloneResult) Rtype ¶
func (CloneResult) Rtype() interface{}
type ClunkResult ¶
type ClunkResult struct{}
func (ClunkResult) Rtype ¶
func (ClunkResult) Rtype() interface{}
type CompositeReq ¶
type CreateResult ¶
func (CreateResult) Rtype ¶
func (CreateResult) Rtype() interface{}
type NonseqResult ¶
type NonseqResult struct { }
func (NonseqResult) Rtype ¶
func (NonseqResult) Rtype() interface{}
type OpenResult ¶
func (OpenResult) Rtype ¶
func (OpenResult) Rtype() interface{}
type ReadResult ¶
type ReadResult struct {
Count int
}
func (ReadResult) Rtype ¶
func (ReadResult) Rtype() interface{}
type RemoveResult ¶
type RemoveResult struct { }
func (RemoveResult) Rtype ¶
func (RemoveResult) Rtype() interface{}
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
func NewSequencer ¶
NewSequencer returns a new object that represents a stream of requests. The caller should arrange to receive the result of each request in turn on result. If one request fails, then all subsequent requests will fail - if this happens, the result channel will be closed early, and the error will be available from seq.Error(). Within a given Sequence, calls to Do and Subsequence
func (*Sequencer) Do ¶
Do adds the given request to the queue of requests on seq. It returns an error if it could not do so.
func (*Sequencer) Error ¶
Error returns any error that has occurred when executing the sequence. The returned value is only valid when the Sequencer's result channel has been closed.
func (*Sequencer) Result ¶
When a Sequencer's result channel has been closed, Result must be called to provide the results of the sequence to its parent. If err is nil, val will be sent on the parent's result channel; otherwise the parent's result channel will be closed and err returned from its Error(). It is an error for err to be non nil if the sequence has not terminated with an error.
func (*Sequencer) Subsequencer ¶
Subsequencer returns a Sequencer that is nested within parent. No requests on parent will take place until all requests on seq have been sent (this allows a subsequence to send requests in a separate goroutine without needing explicit synchronisation to ensure sequentiality). It behaves just as a Sequencer, except that after result has been closed, seq.Result must be called to provide the sub-sequencer's result.
type StatResult ¶
func (StatResult) Rtype ¶
func (StatResult) Rtype() interface{}
type StringResult ¶
type StringResult string
func (StringResult) Rtype ¶
func (StringResult) Rtype() interface{}
type WalkResult ¶
func (WalkResult) Rtype ¶
func (WalkResult) Rtype() interface{}
type WriteResult ¶
type WriteResult struct {
Count int
}
func (WriteResult) Rtype ¶
func (WriteResult) Rtype() interface{}
type WstatResult ¶
type WstatResult struct{}
func (WstatResult) Rtype ¶
func (WstatResult) Rtype() interface{}