record

package
v0.0.0-...-371fbbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2016 License: BSD-2-Clause, BSD-3-Clause, HPND Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

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

func (*Buffer) Bytes

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

func (*Buffer) Write

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

type Counter

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

Counter records number of times a thing has occurred.

func (*Counter) Count

func (r *Counter) Count() uint32

func (*Counter) Inc

func (r *Counter) Inc()

type Creates

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

Creates records a Create request and its fields.

func (*Creates) Create

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

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

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

type Flushes

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

Flushes notes whether a FUSE Flush call has been seen.

func (*Flushes) Flush

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

func (*Flushes) RecordedFlush

func (r *Flushes) RecordedFlush() bool

type Fsyncs

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

Fsyncs records an Fsync request and its fields.

func (*Fsyncs) Fsync

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

func (*Fsyncs) RecordedFsync

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

type Getxattrs

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

Getxattrs records a Getxattr request and its fields.

func (*Getxattrs) Getxattr

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

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

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

Listxattrs records a Listxattr request and its fields.

func (*Listxattrs) Listxattr

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

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

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

type MarkRecorder

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

MarkRecorder records whether a thing has occurred.

func (*MarkRecorder) Mark

func (r *MarkRecorder) Mark()

func (*MarkRecorder) Recorded

func (r *MarkRecorder) Recorded() bool

type Mkdirs

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

Mkdirs records a Mkdir request and its fields.

func (*Mkdirs) Mkdir

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

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

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

type Mknods

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

Mknods records a Mknod request and its fields.

func (*Mknods) Mknod

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

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

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

type Opens

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

Opens records a Open request and its fields.

func (*Opens) Open

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

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

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

type Recorder

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

func (*Recorder) Record

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

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

func (*Recorder) Recorded

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

type ReleaseWaiter

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

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

func (*ReleaseWaiter) WaitForRelease

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

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

Removexattrs records a Removexattr request and its fields.

func (*Removexattrs) RecordedRemovexattr

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

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

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

func (*RequestRecorder) RecordRequest

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

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

type Setattrs

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

Setattrs records a Setattr request and its fields.

func (*Setattrs) RecordedSetattr

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

func (*Setattrs) Setattr

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

type Setxattrs

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

Setxattrs records a Setxattr request and its fields.

func (*Setxattrs) RecordedSetxattr

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

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

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

Writes gathers data from FUSE Write calls.

func (*Writes) RecordedWriteData

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

func (*Writes) Write

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL