fuse: bazil.org/fuse/fs/fstestutil/record Index | Files

package record

import "bazil.org/fuse/fs/fstestutil/record"

Index

Package Files

buffer.go record.go wait.go

type Buffer Uses

type Buffer struct {
    // contains filtered or unexported fields
}

Buffer is like bytes.Buffer but safe to access from multiple goroutines.

func (*Buffer) Bytes Uses

func (b *Buffer) Bytes() []byte

func (*Buffer) Write Uses

func (b *Buffer) Write(p []byte) (n int, err error)

type Counter Uses

type Counter struct {
    // contains filtered or unexported fields
}

Counter records number of times a thing has occurred.

func (*Counter) Count Uses

func (r *Counter) Count() uint32

func (*Counter) Inc Uses

func (r *Counter) Inc()

type Creates Uses

type Creates struct {
    // contains filtered or unexported fields
}

Creates records a Create request and its fields.

func (*Creates) Create Uses

func (r *Creates) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

Create records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Creates) RecordedCreate Uses

func (r *Creates) RecordedCreate() fuse.CreateRequest

RecordedCreate returns information about the Create request. If no request was seen, returns a zero value.

type Flushes Uses

type Flushes struct {
    // contains filtered or unexported fields
}

Flushes notes whether a FUSE Flush call has been seen.

func (*Flushes) Flush Uses

func (r *Flushes) Flush(ctx context.Context, req *fuse.FlushRequest) error

func (*Flushes) RecordedFlush Uses

func (r *Flushes) RecordedFlush() bool

type Fsyncs Uses

type Fsyncs struct {
    // contains filtered or unexported fields
}

Fsyncs records an Fsync request and its fields.

func (*Fsyncs) Fsync Uses

func (r *Fsyncs) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

func (*Fsyncs) RecordedFsync Uses

func (r *Fsyncs) RecordedFsync() fuse.FsyncRequest

type Getxattrs Uses

type Getxattrs struct {
    // contains filtered or unexported fields
}

Getxattrs records a Getxattr request and its fields.

func (*Getxattrs) Getxattr Uses

func (r *Getxattrs) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error

Getxattr records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Getxattrs) RecordedGetxattr Uses

func (r *Getxattrs) RecordedGetxattr() fuse.GetxattrRequest

RecordedGetxattr returns information about the Getxattr request. If no request was seen, returns a zero value.

type Links struct {
    // contains filtered or unexported fields
}

Links records a Link request and its fields.

func (r *Links) Link(ctx context.Context, req *fuse.LinkRequest, old fs.Node) (fs.Node, error)

Link records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (r *Links) RecordedLink() fuse.LinkRequest

RecordedLink returns information about the Link request. If no request was seen, returns a zero value.

type Listxattrs Uses

type Listxattrs struct {
    // contains filtered or unexported fields
}

Listxattrs records a Listxattr request and its fields.

func (*Listxattrs) Listxattr Uses

func (r *Listxattrs) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error

Listxattr records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Listxattrs) RecordedListxattr Uses

func (r *Listxattrs) RecordedListxattr() fuse.ListxattrRequest

RecordedListxattr returns information about the Listxattr request. If no request was seen, returns a zero value.

type MarkRecorder Uses

type MarkRecorder struct {
    // contains filtered or unexported fields
}

MarkRecorder records whether a thing has occurred.

func (*MarkRecorder) Mark Uses

func (r *MarkRecorder) Mark()

func (*MarkRecorder) Recorded Uses

func (r *MarkRecorder) Recorded() bool

type Mkdirs Uses

type Mkdirs struct {
    // contains filtered or unexported fields
}

Mkdirs records a Mkdir request and its fields.

func (*Mkdirs) Mkdir Uses

func (r *Mkdirs) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

Mkdir records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Mkdirs) RecordedMkdir Uses

func (r *Mkdirs) RecordedMkdir() fuse.MkdirRequest

RecordedMkdir returns information about the Mkdir request. If no request was seen, returns a zero value.

type Mknods Uses

type Mknods struct {
    // contains filtered or unexported fields
}

Mknods records a Mknod request and its fields.

func (*Mknods) Mknod Uses

func (r *Mknods) Mknod(ctx context.Context, req *fuse.MknodRequest) (fs.Node, error)

Mknod records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Mknods) RecordedMknod Uses

func (r *Mknods) RecordedMknod() fuse.MknodRequest

RecordedMknod returns information about the Mknod request. If no request was seen, returns a zero value.

type Opens Uses

type Opens struct {
    // contains filtered or unexported fields
}

Opens records a Open request and its fields.

func (*Opens) Open Uses

func (r *Opens) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)

Open records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

func (*Opens) RecordedOpen Uses

func (r *Opens) RecordedOpen() fuse.OpenRequest

RecordedOpen returns information about the Open request. If no request was seen, returns a zero value.

type Recorder Uses

type Recorder struct {
    // contains filtered or unexported fields
}

func (*Recorder) Record Uses

func (r *Recorder) Record(value interface{})

Record that we've seen value. A nil value is indistinguishable from no value recorded.

func (*Recorder) Recorded Uses

func (r *Recorder) Recorded() interface{}

type ReleaseWaiter Uses

type ReleaseWaiter struct {
    // contains filtered or unexported fields
}

ReleaseWaiter notes whether a FUSE Release call has been seen.

Releases are not guaranteed to happen synchronously with any client call, so they must be waited for.

func (*ReleaseWaiter) Release Uses

func (r *ReleaseWaiter) Release(ctx context.Context, req *fuse.ReleaseRequest) error

func (*ReleaseWaiter) WaitForRelease Uses

func (r *ReleaseWaiter) WaitForRelease(dur time.Duration) bool

WaitForRelease waits for Release to be called.

With zero duration, wait forever. Otherwise, timeout early in a more controller way than `-test.timeout`.

Returns whether a Release was seen. Always true if dur==0.

type Removexattrs Uses

type Removexattrs struct {
    // contains filtered or unexported fields
}

Removexattrs records a Removexattr request and its fields.

func (*Removexattrs) RecordedRemovexattr Uses

func (r *Removexattrs) RecordedRemovexattr() fuse.RemovexattrRequest

RecordedRemovexattr returns information about the Removexattr request. If no request was seen, returns a zero value.

func (*Removexattrs) Removexattr Uses

func (r *Removexattrs) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error

Removexattr records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

type RequestRecorder Uses

type RequestRecorder struct {
    // contains filtered or unexported fields
}

func (*RequestRecorder) RecordRequest Uses

func (r *RequestRecorder) RecordRequest(req fuse.Request)

Record a fuse.Request, after zeroing header fields that are hard to reproduce.

Make sure to record a copy, not the original request.

func (*RequestRecorder) Recorded Uses

func (r *RequestRecorder) Recorded() fuse.Request

type Setattrs Uses

type Setattrs struct {
    // contains filtered or unexported fields
}

Setattrs records a Setattr request and its fields.

func (*Setattrs) RecordedSetattr Uses

func (r *Setattrs) RecordedSetattr() fuse.SetattrRequest

func (*Setattrs) Setattr Uses

func (r *Setattrs) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

type Setxattrs Uses

type Setxattrs struct {
    // contains filtered or unexported fields
}

Setxattrs records a Setxattr request and its fields.

func (*Setxattrs) RecordedSetxattr Uses

func (r *Setxattrs) RecordedSetxattr() fuse.SetxattrRequest

RecordedSetxattr returns information about the Setxattr request. If no request was seen, returns a zero value.

func (*Setxattrs) Setxattr Uses

func (r *Setxattrs) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error

Setxattr records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

type Symlinks struct {
    // contains filtered or unexported fields
}

Symlinks records a Symlink request and its fields.

func (r *Symlinks) RecordedSymlink() fuse.SymlinkRequest

RecordedSymlink returns information about the Symlink request. If no request was seen, returns a zero value.

func (r *Symlinks) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node, error)

Symlink records the request and returns an error. Most callers should wrap this call in a function that returns a more useful result.

type Writes Uses

type Writes struct {
    // contains filtered or unexported fields
}

Writes gathers data from FUSE Write calls.

func (*Writes) RecordedWriteData Uses

func (w *Writes) RecordedWriteData() []byte

func (*Writes) Write Uses

func (w *Writes) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

Package record imports 8 packages (graph). Updated 2016-07-23. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).