client

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 9 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Namespace

func Namespace() string

Namespace returns the path to the name space directory.

Types

type Conn

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

func Dial

func Dial(network, addr string) (*Conn, error)

func DialService

func DialService(service string) (*Conn, error)

func NewConn

func NewConn(rwc io.ReadWriteCloser) (*Conn, error)

func (*Conn) Attach

func (c *Conn) Attach(afid *Fid, user, aname string) (*Fsys, error)

func (*Conn) Auth

func (c *Conn) Auth(uname, aname string) (*Fid, error)

func (*Conn) Close

func (c *Conn) Close() error

Close forces a close of the connection and all Fids derived from it.

func (*Conn) Release added in v0.0.5

func (c *Conn) Release() error

Release marks the connection so that it will close automatically when the last Fid derived from it is closed.

If there are no current Fids, it closes immediately. After calling Release, c.Attach, c.Auth and c.Close will return an error.

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Fid

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

func (*Fid) Close

func (fid *Fid) Close() error

func (*Fid) Create

func (fid *Fid) Create(name string, mode uint8, perm plan9.Perm) error

func (*Fid) Dirread

func (fid *Fid) Dirread() ([]*plan9.Dir, error)

func (*Fid) Dirreadall

func (fid *Fid) Dirreadall() ([]*plan9.Dir, error)

func (*Fid) Open

func (fid *Fid) Open(mode uint8) error

func (*Fid) Qid

func (fid *Fid) Qid() plan9.Qid

func (*Fid) Read

func (fid *Fid) Read(b []byte) (n int, err error)

func (*Fid) ReadAt

func (fid *Fid) ReadAt(b []byte, offset int64) (n int, err error)

func (*Fid) ReadFull

func (fid *Fid) ReadFull(b []byte) (n int, err error)

func (*Fid) Remove

func (fid *Fid) Remove() error

func (*Fid) Seek

func (fid *Fid) Seek(n int64, whence int) (int64, error)

func (*Fid) Stat

func (fid *Fid) Stat() (*plan9.Dir, error)

func (*Fid) Walk

func (fid *Fid) Walk(name string) (*Fid, error)

TODO(rsc): Could use ...string instead?

func (*Fid) Write

func (fid *Fid) Write(b []byte) (n int, err error)

func (*Fid) WriteAt

func (fid *Fid) WriteAt(b []byte, offset int64) (n int, err error)

func (*Fid) Wstat

func (fid *Fid) Wstat(d *plan9.Dir) error

type Fsys

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

func Mount

func Mount(network, addr string) (*Fsys, error)

func MountService

func MountService(service string) (*Fsys, error)

func MountServiceAname added in v0.0.3

func MountServiceAname(service, aname string) (*Fsys, error)

func (*Fsys) Access

func (fs *Fsys) Access(name string, mode int) error

func (*Fsys) Close added in v0.0.5

func (fs *Fsys) Close() error

Close closes the Fid underlying fs.

func (*Fsys) Create

func (fs *Fsys) Create(name string, mode uint8, perm plan9.Perm) (*Fid, error)

func (*Fsys) Open

func (fs *Fsys) Open(name string, mode uint8) (*Fid, error)

func (*Fsys) Remove

func (fs *Fsys) Remove(name string) error

func (*Fsys) Stat

func (fs *Fsys) Stat(name string) (*plan9.Dir, error)

func (*Fsys) Wstat

func (fs *Fsys) Wstat(name string, d *plan9.Dir) error

Jump to

Keyboard shortcuts

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