Documentation ¶
Index ¶
- Constants
- Variables
- type AuthFile
- type Client
- func (c *Client) Attach(ctx context.Context, tag uint16, fid, afid uint32, uname, aname string) (Qid, error)
- func (c *Client) Auth(ctx context.Context, tag uint16, afid uint32, uname, aname string) (Qid, error)
- func (c *Client) Clunk(ctx context.Context, tag uint16, fid uint32) error
- func (c *Client) Create(ctx context.Context, tag uint16, fid uint32, name string, perm FileMode, ...) (Qid, uint32, error)
- func (c *Client) Flush(ctx context.Context, tag, oldtag uint16) error
- func (c *Client) Open(ctx context.Context, tag uint16, fid uint32, mode OpenMode) (qid Qid, iounit uint32, err error)
- func (c *Client) Read(ctx context.Context, tag uint16, fid uint32, offset uint64, count uint32) (data []byte, err error)
- func (c *Client) Remove(ctx context.Context, tag uint16, fid uint32) error
- func (c *Client) Stat(ctx context.Context, tag uint16, fid uint32) (*Stat, error)
- func (c *Client) Stop()
- func (c *Client) Version(ctx context.Context, tag uint16, mSize uint32, version string) (uint32, string, error)
- func (c *Client) Walk(ctx context.Context, tag uint16, fid, newFid uint32, wname []string) (wqid []Qid, err error)
- func (c *Client) Write(ctx context.Context, tag uint16, fid uint32, offset uint64, count uint32, ...) (uint32, error)
- func (c *Client) Wstat(ctx context.Context, tag uint16, fid uint32, stat *Stat) error
- type ClientFS
- type ClientFile
- type CreaterFile
- type DirEntry
- type FS
- type Fid
- type FidPool
- type File
- type FileInfo
- type FileMode
- type Msg
- type MsgType
- type OpenMode
- type Qid
- type QidType
- type RAttach
- type RAuth
- type RClunk
- type RCreate
- type RError
- type RFlush
- type ROpen
- type RRead
- type RRemove
- type RStat
- type RVersion
- func (msg *RVersion) MSize() uint32
- func (msg *RVersion) SetMSize(s uint32)
- func (msg *RVersion) SetTag(t uint16)
- func (msg *RVersion) SetVersion(v string)
- func (msg *RVersion) Size() uint32
- func (msg *RVersion) String() string
- func (msg *RVersion) Tag() uint16
- func (msg *RVersion) Type() MsgType
- func (msg *RVersion) Version() string
- type RWStat
- type RWalk
- type RWrite
- type ReadDirFile
- type RemoverFile
- type Req
- type ReqPool
- type Server
- type Stat
- type TAttach
- func (msg *TAttach) AFid() uint32
- func (msg *TAttach) AName() string
- func (msg *TAttach) Fid() uint32
- func (msg *TAttach) SetTag(t uint16)
- func (msg *TAttach) Size() uint32
- func (msg *TAttach) String() string
- func (msg *TAttach) Tag() uint16
- func (msg *TAttach) Type() MsgType
- func (msg *TAttach) UName() string
- type TAuth
- type TClunk
- type TCreate
- func (msg *TCreate) Fid() uint32
- func (msg *TCreate) Mode() OpenMode
- func (msg *TCreate) Name() string
- func (msg *TCreate) Perm() FileMode
- func (msg *TCreate) SetTag(t uint16)
- func (msg *TCreate) Size() uint32
- func (msg *TCreate) String() string
- func (msg *TCreate) Tag() uint16
- func (msg *TCreate) Type() MsgType
- type TFlush
- type TOpen
- type TRead
- type TRemove
- type TStat
- type TVersion
- type TWStat
- type TWalk
- type TWrite
- func (msg *TWrite) Count() uint32
- func (msg *TWrite) Data() []byte
- func (msg *TWrite) Fid() uint32
- func (msg *TWrite) Offset() uint64
- func (msg *TWrite) SetTag(t uint16)
- func (msg *TWrite) Size() uint32
- func (msg *TWrite) String() string
- func (msg *TWrite) Tag() uint16
- func (msg *TWrite) Type() MsgType
- type WriterFile
- type WriterStatFile
Constants ¶
View Source
const ( Tversion MsgType = 100 Rversion = 101 Tauth = 102 Rauth = 103 Tattach = 104 Rattach = 105 Terror = 106 /* illegal */ Rerror = 107 Tflush = 108 Rflush = 109 Twalk = 110 Rwalk = 111 Topen = 112 Ropen = 113 Tcreate = 114 Rcreate = 115 Tread = 116 Rread = 117 Twrite = 118 Rwrite = 119 Tclunk = 120 Rclunk = 121 Tremove = 122 Rremove = 123 Tstat = 124 Rstat = 125 Twstat = 126 Rwstat = 127 Tmax = 128 )
View Source
const ( OREAD OpenMode = 0 OWRITE = 1 ORDWR = 2 OEXEC = 3 OTRUNC = 16 ORCLOSE = 64 )
-1 = not open
View Source
const ( QTDIR QidType = 0x80 /* type bit for directories */ QTAPPEND = 0x40 /* type bit for append only files */ QTEXCL = 0x20 /* type bit for exclusive use files */ QTMOUNT = 0x10 /* type bit for mounted channel */ QTAUTH = 0x08 /* type bit for authentication file */ QTTMP = 0x04 /* type bit for non-backed-up file */ QTSYMLINK = 0x02 /* type bit for symbolic link */ QTFILE = 0x00 /* type bits for plain file */ )
View Source
const IOHDRSZ = 23
Ample room for Twrite/Rread header (iounit). Twrite: size[4] type[1] tag[2] fid[4] offset[8] count[4] = 23 Rread: size[4] type[1] tag[2] count[4] = 11 In Plan9, this const is 24.
View Source
const NOFID = ^uint32(0)
View Source
const NOTAG = ^uint16(0)
Variables ¶
View Source
var ( ErrBotch = fmt.Errorf("bocchi") ErrPerm = fmt.Errorf("permission denied") ErrOperation = fmt.Errorf("operation not supported") ErrDupTag = fmt.Errorf("duplicate tag") ErrUnknownFid = fmt.Errorf("unknown fid") ErrDupFid = fmt.Errorf("duplicate fid") ErrNotFound = fmt.Errorf("not found") )
Functions ¶
This section is empty.
Types ¶
type AuthFile ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Attach ¶
func (*Client) Auth ¶
func (*Client) Create ¶
func (*Client) Open ¶
func (*Client) Read ¶
func (*Client) Stat ¶
func (*Client) Version ¶
func (*Client) Walk ¶
func (*Client) Write ¶
type ClientFS ¶
type ClientFS struct {
// contains filtered or unexported fields
}
type ClientFile ¶
type ClientFile struct {
// contains filtered or unexported fields
}
ClientFile is File for Client.
func (*ClientFile) Read ¶
func (cf *ClientFile) Read(b []byte) (int, error)
func (*ClientFile) Stat ¶
func (cf *ClientFile) Stat() (*FileInfo, error)
type CreaterFile ¶
type FS ¶
type Fid ¶
type FidPool ¶
type FidPool struct {
// contains filtered or unexported fields
}
type Msg ¶
type Msg interface { // Size returns the size field of message. Size() uint32 // Type returns the type field of message. Type() MsgType // Tag returns the tag of message. Tag() uint16 SetTag(uint16) String() string // contains filtered or unexported methods }
Msg represents any kind of message of 9P. It defines methods for common fields.
type Qid ¶
type RAttach ¶
type RAttach struct {
// contains filtered or unexported fields
}
type RAuth ¶
type RAuth struct {
// contains filtered or unexported fields
}
type RClunk ¶
type RClunk struct {
// contains filtered or unexported fields
}
type RCreate ¶
type RCreate struct {
// contains filtered or unexported fields
}
type RError ¶
type RError struct {
// contains filtered or unexported fields
}
type RFlush ¶
type RFlush struct {
// contains filtered or unexported fields
}
type ROpen ¶
type ROpen struct {
// contains filtered or unexported fields
}
type RRead ¶
type RRead struct {
// contains filtered or unexported fields
}
type RRemove ¶
type RRemove struct {
// contains filtered or unexported fields
}
type RStat ¶
type RStat struct {
// contains filtered or unexported fields
}
type RVersion ¶
type RVersion struct {
// contains filtered or unexported fields
}
type RWStat ¶
type RWStat struct {
// contains filtered or unexported fields
}
type RWalk ¶
type RWalk struct {
// contains filtered or unexported fields
}
type RWrite ¶
type RWrite struct {
// contains filtered or unexported fields
}
type Req ¶
type Req struct {
// contains filtered or unexported fields
}
type ReqPool ¶
type ReqPool struct {
// contains filtered or unexported fields
}
type Server ¶
type Stat ¶
type TAttach ¶
type TAttach struct {
// contains filtered or unexported fields
}
type TAuth ¶
type TAuth struct {
// contains filtered or unexported fields
}
type TClunk ¶
type TClunk struct {
// contains filtered or unexported fields
}
type TCreate ¶
type TCreate struct {
// contains filtered or unexported fields
}
type TFlush ¶
type TFlush struct {
// contains filtered or unexported fields
}
type TOpen ¶
type TOpen struct {
// contains filtered or unexported fields
}
type TRead ¶
type TRead struct {
// contains filtered or unexported fields
}
type TRemove ¶
type TRemove struct {
// contains filtered or unexported fields
}
type TStat ¶
type TStat struct {
// contains filtered or unexported fields
}
type TVersion ¶
type TVersion struct {
// contains filtered or unexported fields
}
TVersion represents Tversion message of 9P.
type TWStat ¶
type TWStat struct {
// contains filtered or unexported fields
}
type TWalk ¶
type TWalk struct {
// contains filtered or unexported fields
}
type TWrite ¶
type TWrite struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.