Documentation ¶
Index ¶
- Constants
- type Advice
- type ClockID
- type Device
- type DirCookie
- type DirEntry
- type DirNameLength
- type Errno
- type Event
- type EventFDReadWrite
- type EventFDReadWriteFlags
- type EventType
- type ExitCode
- type FD
- type FDFlags
- type FDStat
- type FSTFlags
- type FileDelta
- type FileSize
- type FileStat
- type FileType
- type INode
- type IOVec
- type Inet4Address
- type Inet6Address
- type LinkCount
- type LookupFlags
- type OpenFlags
- type Port
- type PreOpenType
- type PreStat
- type PreStatDir
- type Protocol
- type ProtocolFamily
- type RIFlags
- type ROFlags
- type Rights
- type SDFlags
- type SIFlags
- type Signal
- type Size
- type SocketAddress
- type SocketOption
- type SocketOptionLevel
- type SocketType
- type SocketsExtension
- type Subscription
- func (s Subscription) FormatObject(w io.Writer, m api.Memory, b []byte)
- func (s *Subscription) GetClock() SubscriptionClock
- func (s *Subscription) GetFDReadWrite() SubscriptionFDReadWrite
- func (s Subscription) LoadObject(_ api.Memory, b []byte) Subscription
- func (s Subscription) ObjectSize() int
- func (s *Subscription) SetClock(c SubscriptionClock)
- func (s *Subscription) SetFDReadWrite(fdrw SubscriptionFDReadWrite)
- func (s Subscription) StoreObject(_ api.Memory, b []byte)
- type SubscriptionClock
- type SubscriptionClockFlags
- type SubscriptionFDReadWrite
- type System
- type Timestamp
- type Tracer
- func (t *Tracer) ArgsGet(ctx context.Context) ([]string, Errno)
- func (t *Tracer) ArgsSizesGet(ctx context.Context) (int, int, Errno)
- func (t *Tracer) ClockResGet(ctx context.Context, id ClockID) (Timestamp, Errno)
- func (t *Tracer) ClockTimeGet(ctx context.Context, id ClockID, precision Timestamp) (Timestamp, Errno)
- func (t *Tracer) Close(ctx context.Context) error
- func (t *Tracer) EnvironGet(ctx context.Context) ([]string, Errno)
- func (t *Tracer) EnvironSizesGet(ctx context.Context) (int, int, Errno)
- func (t *Tracer) FDAdvise(ctx context.Context, fd FD, offset, length FileSize, advice Advice) Errno
- func (t *Tracer) FDAllocate(ctx context.Context, fd FD, offset, length FileSize) Errno
- func (t *Tracer) FDClose(ctx context.Context, fd FD) Errno
- func (t *Tracer) FDDataSync(ctx context.Context, fd FD) Errno
- func (t *Tracer) FDFileStatGet(ctx context.Context, fd FD) (FileStat, Errno)
- func (t *Tracer) FDFileStatSetSize(ctx context.Context, fd FD, size FileSize) Errno
- func (t *Tracer) FDFileStatSetTimes(ctx context.Context, fd FD, accessTime, modifyTime Timestamp, flags FSTFlags) Errno
- func (t *Tracer) FDPreStatDirName(ctx context.Context, fd FD) (string, Errno)
- func (t *Tracer) FDPreStatGet(ctx context.Context, fd FD) (PreStat, Errno)
- func (t *Tracer) FDPread(ctx context.Context, fd FD, iovecs []IOVec, offset FileSize) (Size, Errno)
- func (t *Tracer) FDPwrite(ctx context.Context, fd FD, iovecs []IOVec, offset FileSize) (Size, Errno)
- func (t *Tracer) FDRead(ctx context.Context, fd FD, iovecs []IOVec) (Size, Errno)
- func (t *Tracer) FDReadDir(ctx context.Context, fd FD, entries []DirEntry, cookie DirCookie, ...) (int, Errno)
- func (t *Tracer) FDRenumber(ctx context.Context, from, to FD) Errno
- func (t *Tracer) FDSeek(ctx context.Context, fd FD, offset FileDelta, whence Whence) (FileSize, Errno)
- func (t *Tracer) FDStatGet(ctx context.Context, fd FD) (FDStat, Errno)
- func (t *Tracer) FDStatSetFlags(ctx context.Context, fd FD, flags FDFlags) Errno
- func (t *Tracer) FDSync(ctx context.Context, fd FD) Errno
- func (t *Tracer) FDTell(ctx context.Context, fd FD) (FileSize, Errno)
- func (t *Tracer) FDWrite(ctx context.Context, fd FD, iovecs []IOVec) (Size, Errno)
- func (t *Tracer) PathCreateDirectory(ctx context.Context, fd FD, path string) Errno
- func (t *Tracer) PathFileStatGet(ctx context.Context, fd FD, lookupFlags LookupFlags, path string) (FileStat, Errno)
- func (t *Tracer) PathFileStatSetTimes(ctx context.Context, fd FD, lookupFlags LookupFlags, path string, ...) Errno
- func (t *Tracer) PathLink(ctx context.Context, oldFD FD, oldFlags LookupFlags, oldPath string, newFD FD, ...) Errno
- func (t *Tracer) PathOpen(ctx context.Context, fd FD, dirFlags LookupFlags, path string, ...) (FD, Errno)
- func (t *Tracer) PathReadLink(ctx context.Context, fd FD, path string, buffer []byte) ([]byte, Errno)
- func (t *Tracer) PathRemoveDirectory(ctx context.Context, fd FD, path string) Errno
- func (t *Tracer) PathRename(ctx context.Context, fd FD, oldPath string, newFD FD, newPath string) Errno
- func (t *Tracer) PathSymlink(ctx context.Context, oldPath string, fd FD, newPath string) Errno
- func (t *Tracer) PathUnlinkFile(ctx context.Context, fd FD, path string) Errno
- func (t *Tracer) PollOneOff(ctx context.Context, subscriptions []Subscription, events []Event) (int, Errno)
- func (t *Tracer) Preopen(hostfd int, path string, fdstat FDStat) FD
- func (t *Tracer) ProcExit(ctx context.Context, exitCode ExitCode) Errno
- func (t *Tracer) ProcRaise(ctx context.Context, signal Signal) Errno
- func (t *Tracer) RandomGet(ctx context.Context, b []byte) Errno
- func (t *Tracer) Register(hostfd int, fdstat FDStat) FD
- func (t *Tracer) SchedYield(ctx context.Context) Errno
- func (t *Tracer) SockAccept(ctx context.Context, fd FD, flags FDFlags) (FD, Errno)
- func (t *Tracer) SockBind(ctx context.Context, fd FD, addr SocketAddress) Errno
- func (t *Tracer) SockConnect(ctx context.Context, fd FD, addr SocketAddress) Errno
- func (t *Tracer) SockGetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption) (int, Errno)
- func (t *Tracer) SockListen(ctx context.Context, fd FD, backlog int) Errno
- func (t *Tracer) SockLocalAddress(ctx context.Context, fd FD) (SocketAddress, Errno)
- func (t *Tracer) SockOpen(ctx context.Context, pf ProtocolFamily, socketType SocketType, ...) (FD, Errno)
- func (t *Tracer) SockPeerAddress(ctx context.Context, fd FD) (SocketAddress, Errno)
- func (t *Tracer) SockRecv(ctx context.Context, fd FD, iovecs []IOVec, iflags RIFlags) (Size, ROFlags, Errno)
- func (t *Tracer) SockRecvFrom(ctx context.Context, fd FD, iovecs []IOVec, iflags RIFlags) (Size, ROFlags, SocketAddress, Errno)
- func (t *Tracer) SockSend(ctx context.Context, fd FD, iovecs []IOVec, iflags SIFlags) (Size, Errno)
- func (t *Tracer) SockSendTo(ctx context.Context, fd FD, iovecs []IOVec, iflags SIFlags, addr SocketAddress) (Size, Errno)
- func (t *Tracer) SockSetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption, ...) Errno
- func (t *Tracer) SockShutdown(ctx context.Context, fd FD, flags SDFlags) Errno
- type UnixAddress
- type UserData
- type Whence
Constants ¶
const SizeOfDirent = 24
SizeOfDirent is the size in bytes of directory entries when serialized to the output buffer of fd_readdir.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advice ¶
type Advice uint8
Advice is file or memory access pattern advisory information.
const ( // Normal indicates that the application has no advice to give on its // behavior with respect to the specified data. Normal Advice = iota // Sequential indicates that the application expects to access the // specified data sequentially from lower offsets to higher offsets. Sequential // Random indicates that the application expects to access the specified // data in a random order. Random // WillNeed indicates that the application expects to access the specified // data in the near future. WillNeed // DontNeed indicates that the application expects that it will not access // the specified data in the near future. DontNeed // NoReuse indicates that the application expects to access the specified // data once and then not reuse it thereafter. NoReuse )
type ClockID ¶
type ClockID uint32
ClockID is an identifier for clocks.
const ( // Realtime is the clock measuring real time. Time value zero corresponds // with 1970-01-01T00:00:00Z. Realtime ClockID = iota // Monotonic is the store-wide monotonic clock, which is defined as a clock // measuring real time, whose value cannot be adjusted and which cannot // have negative clock jumps. The epoch of this clock is undefined. The // absolute time value of this clock therefore has no meaning. Monotonic // ProcessCPUTimeID is the CPU-time clock associated with the current // process. ProcessCPUTimeID // ThreadCPUTimeID is the CPU-time clock associated with the current // thread. ThreadCPUTimeID )
type Device ¶
type Device uint64
Device is an identifier for a device containing a file system.
It can be used in combination with INode to uniquely identify a file or directory in the filesystem.
type DirCookie ¶
type DirCookie uint64
DirCookie is a reference to the offset of a directory entry.
The value 0 signifies the start of the directory.
type DirEntry ¶
type DirEntry struct { // Next is the offset of the next directory entry stored in this directory. Next DirCookie // INode is the serial number of the file referred to by this directory // entry. INode INode // Type is the type of the file referred to by this directory entry. Type FileType // Name of the directory entry. When the directory entry is retrieved by a // call to FDReadDir, the name may point to an internal buffer and therefore // remains valid only until the next call to FDReadDir. Name []byte }
DirEntry is a directory entry.
type DirNameLength ¶
type DirNameLength uint32
DirNameLength is the type for the DirEntry.NameLength field.
type Errno ¶
type Errno uint16
Errno are the error codes returned by functions.
Not all of these error codes are returned by the functions provided by this API; some are used in higher-level library layers, and others are provided merely for alignment with POSIX.
const ( // ESUCCESS indicates that no error occurred (system call completed // successfully). ESUCCESS Errno = iota // E2BIG means an argument list is too long. E2BIG // EACCES means permission is denied. EACCES // EADDRINUSE means an address is already in use. EADDRINUSE // EADDRNOTAVAIL means an address is not available. EADDRNOTAVAIL // EAFNOSUPPORT means an address family is not supported by a protocol family. EAFNOSUPPORT // EAGAIN means the caller should try again. EAGAIN // EALREADY means a socket already connected EALREADY // EBADF means bad file number. EBADF // EBADMSG indicates that the caller is trying to read an unreadable message. EBADMSG // EBUSY means a device or resource busy. EBUSY // ECANCELED means an operation was canceled. ECANCELED // ECHILD means no child processes. ECHILD // ECONNABORTED means a connection was aborted. ECONNABORTED // ECONNREFUSED means connection was refused. ECONNREFUSED // ECONNRESET means a connection was reset by peer. ECONNRESET // EDEADLK indicates a deadlock condition. EDEADLK // EDESTADDRREQ means a destination address is required. EDESTADDRREQ // EDOM means a math argument is out of domain of func. EDOM // EDQUOT means a quota was exceeded. EDQUOT // EEXIST means a file exists. EEXIST // EFAULT means bad address. EFAULT // EFBIG indicates a file is too large. EFBIG // EHOSTUNREACH means a host is unreachable. EHOSTUNREACH // EIDRM means identifier removed. EIDRM // EILSEQ indicates an illegal byte sequence EILSEQ // EINPROGRESS means a connection is already in progress. EINPROGRESS // EINTR means a system call was interrupted. EINTR // EINVAL means an argument was invalid. EINVAL // EIO means an I/O error occurred. EIO // EISCONN means a socket is already connected. EISCONN // EISDIR means a file is a directory. EISDIR // ELOOP indicates that there are too many symbolic links. ELOOP // EMFILE indicates that there are too many open files EMFILE // EMLINK indicates that there are too many links EMLINK // EMSGSIZE means a message is too long. EMSGSIZE // EMULTIHOP means a multihop was attempted. EMULTIHOP // ENAMETOOLONG means a file name is too long. ENAMETOOLONG // ENETDOWN means a network interface is not configured. ENETDOWN // ENETRESET means a network was dropped connection on reset. ENETRESET // ENETUNREACH means a network is unreachable. ENETUNREACH // ENFILE means a file table overflow occurred. ENFILE // ENOBUFS means that no buffer space is available. ENOBUFS // ENODEV means no such device. ENODEV // ENOENT means no such file or directory. ENOENT // ENOEXEC means an exec format error. ENOEXEC // ENOLCK means that there are no record locks available ENOLCK // ENOLINK means the link has been severed. ENOLINK // ENOMEM means out of memory. ENOMEM // ENOMSG means that there is no message of desired type. ENOMSG // ENOPROTOOPT means a protocol is not available. ENOPROTOOPT // ENOSPC means that there is no space left on a device. ENOSPC // ENOSYS means not implemented. ENOSYS // ENOTCONN means a socket is not connected. ENOTCONN // ENOTDIR means a file is not a directory ENOTDIR // ENOTEMPTY means a directory is not empty. ENOTEMPTY // ENOTRECOVERABLE means state is not recoverable. ENOTRECOVERABLE // ENOTSOCK means a socket operation was attempted on a non-socket. ENOTSOCK // ENOTSUP means not supported. ENOTSUP // ENOTTY means not a typewriter. ENOTTY // ENXIO means no such device or address. ENXIO // EOVERFLOW means the value is too large for defined data type. EOVERFLOW // EOWNERDEAD means an owner died. EOWNERDEAD // EPERM means an operation is not permitted. EPERM // EPIPE means broken pipe. EPIPE // EPROTO means a protocol error ocurred. EPROTO // EPROTONOSUPPORT means a protocol is not supported. EPROTONOSUPPORT // EPROTOTYPE means that a protocol is the wrong type for socket. EPROTOTYPE // ERANGE means a math result is not representable. ERANGE // EROFS means a file system is read-only. EROFS // ESPIPE means a seek is illegal. ESPIPE // ESRCH means no such process. ESRCH // ESTALE means a file handle is stale. ESTALE // ETIMEDOUT means a connection timed out. ETIMEDOUT // ETXTBSY means text file busy. ETXTBSY // EXDEV means cross-device link. EXDEV // ENOTCAPABLE means capabilities are insufficient. ENOTCAPABLE )
type Event ¶
type Event struct { // UserData is the user-provided value that got attached to // Subscription.UserData. UserData UserData // Errno is an error that occurred while processing the subscription // request. Errno Errno // EventType is the type of event that occurred. EventType EventType // FDReadWrite is the contents of the event, if it is a FDReadEvent or // FDWriteEvent. ClockEvent events ignore this field. FDReadWrite EventFDReadWrite }
Event is an event that occurred.
func (Event) ObjectSize ¶
type EventFDReadWrite ¶
type EventFDReadWrite struct { // NBytes is the number of bytes available for reading or writing. NBytes FileSize // Flags is the state of the file descriptor. Flags EventFDReadWriteFlags }
EventFDReadWrite is the contents of an event when event type is FDReadEvent or FDWriteEvent.
type EventFDReadWriteFlags ¶
type EventFDReadWriteFlags uint16
EventFDReadWriteFlags is the state of the file descriptor subscribed to with FDReadEvent or FDWriteEvent.
const ( // Hangup is a flag that indicates that the peer of this socket // has closed or disconnected. Hangup EventFDReadWriteFlags = 1 << iota )
func (EventFDReadWriteFlags) Has ¶
func (flags EventFDReadWriteFlags) Has(f EventFDReadWriteFlags) bool
Has is true if the flag is set.
func (EventFDReadWriteFlags) String ¶
func (flags EventFDReadWriteFlags) String() string
type EventType ¶
type EventType uint8
EventType is a type of a subscription to an event, or its occurrence.
const ( // ClockEvent is an event type that indicates that the time value of clock // SubscriptionClock.ID has reached timestamp SubscriptionClock.Timeout. ClockEvent EventType = iota // FDReadEvent is an event type that indicates that the file descriptor // SubscriptionFDReadWrite.FD has data available for reading. FDReadEvent // FDWriteEvent is an event type that indicates that the file descriptor // SubscriptionFDReadWrite.FD has data available for writing. FDWriteEvent )
type FDFlags ¶
type FDFlags uint16
FDFlags are file descriptor flags.
const ( // Append indicates append mode; data written to the file is always // appended to the file's end. Append FDFlags = 1 << iota // DSync means write according to synchronized I/O data integrity // completion. // // Only the data stored in the file is synchronized. DSync // NonBlock indicates non-blocking mode. NonBlock // RSync indicates synchronized read I/O operations. RSync // Sync means write according to synchronized I/O data integrity // completion. // // In addition to synchronizing the data stored in the file, the // implementation may also synchronously update the file's metadata. Sync )
type FDStat ¶
type FDStat struct { // FileType is the file type. FileType FileType // Flags are the file descriptor flags. Flags FDFlags // RightsBase are rights that apply to this file descriptor. RightsBase Rights // RightsInheriting are the maximum set of rights that may be installed on // new file descriptors that are created through this file descriptor, // e.g. through PathOpen. RightsInheriting Rights }
FDStat is file descriptor attributes.
func (FDStat) ObjectSize ¶
type FSTFlags ¶
type FSTFlags uint16
FSTFlags indicate which file time attributes to adjust.
const ( // AccessTime means adjust the last data access timestamp to the value // stored in FileStat.AccessTime. AccessTime FSTFlags = 1 << iota // AccessTimeNow means adjust the last data access timestamp to the time // of clock Realtime. AccessTimeNow // ModifyTime means adjust the last data modification timestamp to the value // stored in FileStat.ModifyTime. ModifyTime // ModifyTimeNow means adjust the last data modification timestamp to the time // of clock Realtime. ModifyTimeNow )
type FileSize ¶
type FileSize uint64
FileSize is a non-negative file size or length of a region within a file.
type FileStat ¶
type FileStat struct { // Device is the ID of the device containing the file. Device Device // INode is the file serial number. INode INode // FileType is the file type. FileType FileType // NLink is the number of hard links to the file. NLink LinkCount // Size is the size. For regular files, it's the file size in bytes. For // symbolic links, the length in bytes of the pathname contained in the // symbolic link. Size FileSize // AccessTime is the last data access timestamp. AccessTime Timestamp // ModifyTime is the last data modification timestamp. ModifyTime Timestamp // ChangeTime is the last file status change timestamp. ChangeTime Timestamp }
FileStat are file attributes.
func (FileStat) ObjectSize ¶
type FileType ¶
type FileType uint8
FileType is the type of a file descriptor or file.
const ( // UnknownType indicates that the type of the file descriptor or file is // unknown or is different from any of the other types specified. UnknownType FileType = iota // BlockDeviceType is indicates that the file descriptor or file refers to // a block device inode. BlockDeviceType // CharacterDeviceType indicates that the file descriptor or file refers to // a character device inode. CharacterDeviceType // DirectoryType indicates that the file descriptor or file refers to a // directory inode. DirectoryType // RegularFileType indicates that the file descriptor or file refers to a // regular file inode. RegularFileType // SocketDGramType indicates that the file descriptor or file refers to a // datagram socket. SocketDGramType // SocketStreamType indicates that the file descriptor or file refers to a // byte-stream socket. SocketStreamType // SymbolicLinkType indicates that the file refers to a symbolic link // inode. SymbolicLinkType )
type IOVec ¶
type IOVec []byte
IOVec is a slice of bytes.
func (IOVec) FormatObject ¶
func (IOVec) ObjectSize ¶
type Inet4Address ¶
func (*Inet4Address) Network ¶
func (a *Inet4Address) Network() string
func (*Inet4Address) String ¶
func (a *Inet4Address) String() string
type Inet6Address ¶
func (*Inet6Address) Network ¶
func (a *Inet6Address) Network() string
func (*Inet6Address) String ¶
func (a *Inet6Address) String() string
type LookupFlags ¶
type LookupFlags uint32
LookupFlags determine the method of how paths are resolved.
const ( // SymlinkFollow means that as long as the resolved path corresponds to a // symbolic link, it is expanded. SymlinkFollow LookupFlags = 1 << iota )
func (LookupFlags) Has ¶
func (flags LookupFlags) Has(f LookupFlags) bool
Has is true if the flag is set.
func (LookupFlags) String ¶
func (flags LookupFlags) String() string
type OpenFlags ¶
type OpenFlags uint16
OpenFlags are flags used by PathOpen.
const ( // OpenCreate means create a file if it does not exist. OpenCreate OpenFlags = 1 << iota // OpenDirectory means fail if the path is not a directory. OpenDirectory // OpenExclusive means fail if the file already exists. OpenExclusive // OpenTruncate means truncate file to size 0. OpenTruncate )
type PreOpenType ¶
type PreOpenType uint8
PreOpenType are identifiers for pre-opened capabilities.
const ( // PreOpenDir is a pre-opened directory. PreOpenDir PreOpenType = iota )
func (PreOpenType) String ¶
func (p PreOpenType) String() string
type PreStat ¶
type PreStat struct { // Type is the type of pre-open. Type PreOpenType // PreStatDir is directory information when type is PreOpenDir. PreStatDir PreStatDir }
PreStat is information about a pre-opened capability.
func (PreStat) ObjectSize ¶
type PreStatDir ¶
type PreStatDir struct { // NameLength is the length of the directory name for use with // FDPreStatDirName. NameLength Size }
PreStatDir is the contents of a PreStat when type is PreOpenDir.
type ProtocolFamily ¶
type ProtocolFamily int32
ProtocolFamily is a socket protocol family.
const ( Inet ProtocolFamily Inet6 )
func (ProtocolFamily) String ¶
func (pf ProtocolFamily) String() string
type Rights ¶
type Rights uint64
Rights are file descriptor rights, determining which actions may be performed.
const ( // FDDataSyncRight is the right to invoke FDDataSync. // // If PathOpenRight is set, it includes the right to invoke PathOpen with // the DSync flag. FDDataSyncRight Rights = 1 << iota // FDReadRight is the right to invoke FDRead and SockRecv. // // If FDSeekRight is set, it includes the right to invoke FDPread. FDReadRight // FDSeekRight is the right to invoke FDSeek. This flag implies FDTellRight. FDSeekRight // FDStatSetFlagsRight is the right to invoke FDStatSetFlags. FDStatSetFlagsRight // FDSyncRight is the right to invoke FDSync. // // If PathOpenRight is set, it includes the right to invoke PathOpen with // flags RSync and DSync. FDSyncRight // FDTellRight is the right to invoke FDTell, and the right to invoke // FDSeek in such a way that the file offset remains unaltered (i.e. // WhenceCurrent with offset zero). FDTellRight // FDWriteRight is the right to invoke FDWrite and SockSend. // // If FDSeekRight is set, it includes the right to invoke FDPwrite. FDWriteRight // FDAdviseRight is the right to invoke FDAdvise. FDAdviseRight // FDAllocateRight is the right to invoke FDAllocate. FDAllocateRight // PathCreateDirectoryRight is the right to invoke PathCreateDirectory. PathCreateDirectoryRight // PathCreateFileRight is (along with PathOpenRight) the right to invoke // PathOpen with the OpenCreate flag. PathCreateFileRight // PathLinkSourceRight is the right to invoke PathLink with the file // descriptor as the source directory. PathLinkSourceRight // PathLinkTargetRight is the right to invoke PathLink with the file // descriptor as the target directory. PathLinkTargetRight // PathOpenRight is the right to invoke PathOpen. PathOpenRight // FDReadDirRight is the right to invoke FDReadDir. FDReadDirRight // PathReadLinkRight is the right to invoke PathReadLink. PathReadLinkRight // PathRenameSourceRight is the right to invoke PathRename with the file // descriptor as the source directory. PathRenameSourceRight // PathRenameTargetRight is the right to invoke PathRename with the file // descriptor as the target directory. PathRenameTargetRight // PathFileStatGetRight is the right to invoke PathFileStatGet. PathFileStatGetRight // PathFileStatSetSizeRight is the right to change a file's size. // // If PathOpenRight is set, it includes the right to invoke PathOpen with // the OpenTruncate flag. // // Note: there is no function named PathFileStatSetSize. This follows POSIX // design, which only has ftruncate and does not provide ftruncateat. While // such function would be desirable from the API design perspective, there // are virtually no use cases for it since no code written for POSIX // systems would use it. Moreover, implementing it would require multiple // syscalls, leading to inferior performance. PathFileStatSetSizeRight // PathFileStatSetTimesRight is the right to invoke PathFileStatSetTimes. PathFileStatSetTimesRight // FDFileStatGetRight is the right to invoke FDFileStatGet. FDFileStatGetRight // FDFileStatSetSizeRight is the right to invoke FDFileStatSetSize. FDFileStatSetSizeRight // FDFileStatSetTimesRight is the right to invoke FDFileStatSetTimes. FDFileStatSetTimesRight // PathSymlinkRight is the right to invoke PathSymlink. PathSymlinkRight // PathRemoveDirectoryRight is the right to invoke PathRemoveDirectory. PathRemoveDirectoryRight // PathUnlinkFileRight is the right to invoke PathUnlinkFile. PathUnlinkFileRight // PollFDReadWriteRight is the right to invoke PollOneOff. // // If FDReadWrite is set, it includes the right to invoke PollOneOff with a // FDReadEvent subscription. If FDWriteWrite is set, it includes the right // to invoke PollOneOff with a FDWriteEvent subscription. PollFDReadWriteRight // SockShutdownRight is the right to invoke SockShutdown SockShutdownRight // SockAccessRight is the right to invoke SockAccept SockAcceptRight // AllRights is the set of all available rights AllRights Rights = (1 << 30) - 1 // ReadRights are rights related to reads. ReadRights Rights = FDReadRight | FDReadDirRight // WriteRights are rights related to writes. WriteRights Rights = FDWriteRight | FDAllocateRight | PathFileStatSetSizeRight | FDDataSyncRight // FileRights are rights related to files. FileRights Rights = syncRights | seekRights | fileStatRights | FDReadRight | FDStatSetFlagsRight | FDWriteRight | FDAdviseRight | FDAllocateRight | PollFDReadWriteRight // DirectoryRights are rights related to directories. // See https://github.com/WebAssembly/wasi-testsuite/blob/1b1d4a5/tests/rust/src/bin/directory_seek.rs DirectoryRights Rights = pathRights | syncRights | fileStatRights | FDStatSetFlagsRight | FDReadDirRight // TTYRights are rights related to terminals. // See https://github.com/WebAssembly/wasi-libc/blob/a6f871343/libc-bottom-half/sources/isatty.c TTYRights = FileRights &^ seekRights // SockListenRights are rights for listener sockets. SockListenRights = SockAcceptRight | PollFDReadWriteRight | FDFileStatGetRight | FDStatSetFlagsRight // SockConnectionRights are rights for connection sockets. SockConnectionRights = FDReadRight | FDWriteRight | PollFDReadWriteRight | SockShutdownRight | FDFileStatGetRight | FDStatSetFlagsRight )
func (Rights) Has ¶
Has is true if the flag is set. If multiple flags are specified, Has returns true if all flags are set.
type SDFlags ¶
type SDFlags uint16
SDFlags are flags provided to SockShutdown which indicate which channels on a socket to shut down.
type SIFlags ¶
type SIFlags uint16
SIFlags are flags provided to SockSend.
As there are currently no flags defined, it must be set to zero.
type Signal ¶
type Signal uint8
Signal is a signal condition.
const ( // SIGNONE means no signal. Note that POSIX has special semantics for // kill(pid, 0), so this value is reserved. SIGNONE Signal = iota // SIGHUP means hangup. Action: Terminates the process. SIGHUP // SIGINT is the terminate interrupt signal. Action: Terminates the // process. SIGINT // SIGQUIT is the terminal quit signal. Action: Terminates the process. SIGQUIT // SIGILL means illegal instruction. Action: Terminates the process. SIGILL // SIGTRAP is the trace/breakpoint trap. Action: Terminates the process. SIGTRAP // SIGABRT is the process abort signal. Action: Terminates the process. SIGABRT // SIGBUS indicates access to an undefined portion of a memory object. // Action: Terminates the process. SIGBUS // SIGFPE indicates an erroneous arithmetic operation. Action: Terminates // the process. SIGFPE // SIGKILL means kill. Action: Terminates the process. SIGKILL // SIGUSR1 is the user-defined signal 1. Action: Terminates the process. SIGUSR1 // SIGSEGV indicates an invalid memory reference. Action: Terminates the // process. SIGSEGV // SIGUSR2 is the user-defined signal 1. Action: Terminates the process. SIGUSR2 // SIGPIPE indicates a write on a pipe with no one to read it. // Action: Ignored. SIGPIPE // SIGALRM indicates an alarm clock. Action: Terminates the process. SIGALRM // SIGTERM is the termination signal. Action: Terminates the process. SIGTERM // SIGCHLD indicates that a child process terminated, stopped, or // continued. Action: Ignored. SIGCHLD // SIGCONT indicates that execution should continue, if stopped. // Action: Continues executing, if stopped. SIGCONT // SIGSTOP means stop executing. Action: Stops executing. SIGSTOP // SIGTSTP is the terminal stop signal. Action: Stops executing. SIGTSTP // SIGTTIN indicates that a background process is attempting read. // Action: Stops executing. SIGTTIN // SIGTTOU indicates that a background process is attempting write. // Action: Stops executing. SIGTTOU // SIGURG indicates that high bandwidth data is available at a socket. // Action: Ignored. SIGURG // SIGXCPU means CPU time limit exceeded. Action: Terminates the process. SIGXCPU // SIGXFSZ means file size limit exceeded. Action: Terminates the process. SIGXFSZ // SIGVTALRM means virtual timer expired. Action: Terminates the process. SIGVTALRM // SIGPROF means profiling timer expired. Action: Terminates the process. SIGPROF // SIGWINCH means window changed. Action: Ignored. SIGWINCH // SIGPOLL means I/O is possible. Action: Terminates the process. SIGPOLL // SIGPWR indicates power failure. Action: Terminates the process. SIGPWR // SIGSYS indicates a bad system call. Action: Terminates the process. SIGSYS )
type SocketAddress ¶
type SocketAddress interface { Network() string String() string // contains filtered or unexported methods }
SocketAddress is a socket address.
type SocketOption ¶
type SocketOption int32
SocketOption is a socket option that can be queried or set.
const ( ReuseAddress SocketOption = iota QuerySocketType QuerySocketError DontRoute Broadcast SendBufferSize RecvBufferSize KeepAlive OOBInline Linger RecvLowWatermark RecvTimeout SendTimeout QueryAcceptConnections )
func (SocketOption) String ¶
func (so SocketOption) String() string
type SocketOptionLevel ¶
type SocketOptionLevel int32
SocketOptionLevel controls the level that a socket option is applied at or queried from.
const (
SocketLevel SocketOptionLevel = iota
)
func (SocketOptionLevel) String ¶
func (sl SocketOptionLevel) String() string
type SocketType ¶
type SocketType int32
SocketType is a type of socket.
const ( DatagramSocket SocketType StreamSocket )
func (SocketType) String ¶
func (st SocketType) String() string
type SocketsExtension ¶
type SocketsExtension interface { // SockOpen opens a socket. // // Note: This is similar to socket in POSIX. SockOpen(ctx context.Context, family ProtocolFamily, socketType SocketType, protocol Protocol, rightsBase, rightsInheriting Rights) (FD, Errno) // SockBind binds a socket to an address. // // The implementation must not retain the socket address. // // Note: This is similar to bind in POSIX. SockBind(ctx context.Context, fd FD, addr SocketAddress) Errno // SockConnect connects a socket to an address. // // The implementation must not retain the socket address. // // Note: This is similar to connect in POSIX. SockConnect(ctx context.Context, fd FD, addr SocketAddress) Errno // SockListen allows the socket to accept connections with SockAccept. // // Note: This is similar to listen in POSIX. SockListen(ctx context.Context, fd FD, backlog int) Errno // SockSendTo sends a message on a socket. // // It's similar to SockSend, but accepts an additional SocketAddress. // // Note: This is similar to sendto in POSIX, though it also supports // writing the data from multiple buffers in the manner of writev. SockSendTo(ctx context.Context, fd FD, iovecs []IOVec, flags SIFlags, addr SocketAddress) (Size, Errno) // SockRecvFrom receives a message from a socket. // // It's similar to SockRecv, but returns an additional SocketAddress. // // Note: This is similar to recvfrom in POSIX, though it also supports reading // the data into multiple buffers in the manner of readv. SockRecvFrom(ctx context.Context, fd FD, iovecs []IOVec, flags RIFlags) (Size, ROFlags, SocketAddress, Errno) // SockGetOptInt gets a socket option. // // Note: This is similar to getsockopt in POSIX. SockGetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption) (int, Errno) // SockSetOptInt sets a socket option. // // Note: This is similar to setsockopt in POSIX. SockSetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption, value int) Errno // SockLocalAddress gets the local address of the socket. // // The returned address is only valid until the next call on this // interface. Assume that any method may invalidate the address. // // Note: This is similar to getsockname in POSIX. SockLocalAddress(ctx context.Context, fd FD) (SocketAddress, Errno) // SockPeerAddress gets the address of the peer when the socket is a // connection. // // The returned address is only valid until the next call on this // interface. Assume that any method may invalidate the address. // // Note: This is similar to getpeername in POSIX. SockPeerAddress(ctx context.Context, fd FD) (SocketAddress, Errno) }
SocketsExtension is a sockets extension for WASI preview 1.
type Subscription ¶
type Subscription struct { // UserData is a user-provided value that is attached to the subscription // in the implementation and returned through Event.UserData. UserData UserData // EventType is the type of the event to subscribe to. EventType EventType // contains filtered or unexported fields }
Subscription is a subscription to an event.
func MakeSubscriptionClock ¶
func MakeSubscriptionClock(userData UserData, c SubscriptionClock) Subscription
MakeSubscriptionClock makes a Subscription for ClockEvent events.
func MakeSubscriptionFDReadWrite ¶
func MakeSubscriptionFDReadWrite(userData UserData, eventType EventType, fdrw SubscriptionFDReadWrite) Subscription
MakeSubscriptionFDReadWrite makes a Subscription for FDReadEvent or FDWriteEvent events.
func (Subscription) FormatObject ¶
func (*Subscription) GetClock ¶
func (s *Subscription) GetClock() SubscriptionClock
GetClock gets the embedded SubscriptionClock.
func (*Subscription) GetFDReadWrite ¶
func (s *Subscription) GetFDReadWrite() SubscriptionFDReadWrite
GetFDReadWrite gets the embedded SubscriptionFDReadWrite.
func (Subscription) LoadObject ¶
func (s Subscription) LoadObject(_ api.Memory, b []byte) Subscription
func (Subscription) ObjectSize ¶
func (s Subscription) ObjectSize() int
func (*Subscription) SetClock ¶
func (s *Subscription) SetClock(c SubscriptionClock)
SetClock sets the subscription variant to a SubscriptionClock.
func (*Subscription) SetFDReadWrite ¶
func (s *Subscription) SetFDReadWrite(fdrw SubscriptionFDReadWrite)
SetFDReadWrite sets the subscription variant to a SubscriptionFDReadWrite.
func (Subscription) StoreObject ¶
func (s Subscription) StoreObject(_ api.Memory, b []byte)
type SubscriptionClock ¶
type SubscriptionClock struct { // ID is the clock against which to compare the timestamp. ID ClockID // Timeout is the absolute or relative timestamp. Timeout Timestamp // Precision is the amount of time that the implementation may wait // additionally to coalesce with other events. Precision Timestamp // Flags specify whether the timeout is absolute or relative. Flags SubscriptionClockFlags }
SubscriptionClock is the contents of a subscription when event type is ClockEvent.
func (SubscriptionClock) Format ¶
func (c SubscriptionClock) Format(w io.Writer)
type SubscriptionClockFlags ¶
type SubscriptionClockFlags uint16
SubscriptionClockFlags are flags determining how to interpret the timestamp provided in SubscriptionClock.Timeout.
const ( // Abstime is a flag indicating that the timestamp provided in // SubscriptionClock.Timeout is an absolute timestamp of clock // SubscriptionClock.ID. If unset, treat the timestamp provided in // SubscriptionClock.Timeout as relative to the current time value of clock // SubscriptionClock.ID. Abstime SubscriptionClockFlags = 1 << iota )
func (SubscriptionClockFlags) Has ¶
func (flags SubscriptionClockFlags) Has(f SubscriptionClockFlags) bool
Has is true if the flag is set.
func (SubscriptionClockFlags) String ¶
func (flags SubscriptionClockFlags) String() string
type SubscriptionFDReadWrite ¶
type SubscriptionFDReadWrite struct { // FD is the file descriptor to wait on. FD FD }
SubscriptionFDReadWrite is the contents of a subscription when event type is FDReadEvent or FDWriteEvent.
func (SubscriptionFDReadWrite) Format ¶
func (c SubscriptionFDReadWrite) Format(w io.Writer)
type System ¶
type System interface { // Preopen registers an open directory or socket as a "preopen", granting // access to the WASM module. Preopen(hostfd int, path string, fdstat FDStat) FD // ArgsSizesGet reads command-line argument data sizes. // // The implementation should return the number of args, and the number of // bytes required to hold the strings (including terminating null bytes). ArgsSizesGet(ctx context.Context) (argCount int, stringBytes int, errno Errno) // ArgsGet reads command-line argument data. ArgsGet(ctx context.Context) ([]string, Errno) // EnvironSizesGet reads environment variable data sizes. // // The implementation should return the number of env variables, and the // number of bytes required to hold the strings (including terminating // null bytes). EnvironSizesGet(ctx context.Context) (argCount int, stringBytes int, errno Errno) // EnvironGet reads environment variable data. // // Key/value pairs are expected to be joined with an '=' char. EnvironGet(ctx context.Context) ([]string, Errno) // ClockResGet returns the resolution of a clock. // // The function accepts the clock ID for which to return the resolution. // // Implementations are required to provide a non-zero value for supported // clocks. For unsupported clocks, EINVAL is returned. // // Note: This is similar to clock_getres in POSIX. ClockResGet(ctx context.Context, id ClockID) (Timestamp, Errno) // ClockTimeGet returns the time value of a clock. // // The function accepts the clock ID for which to return the time. It // also accepts a precision which represents the maximum lag (exclusive) // that the returned time value may have, compared to its actual value. // // Note: This is similar to clock_gettime in POSIX. ClockTimeGet(ctx context.Context, id ClockID, precision Timestamp) (Timestamp, Errno) // FDAdvise provides file advisory information on a file descriptor // // Note: This is similar to posix_fadvise in POSIX. FDAdvise(ctx context.Context, fd FD, offset FileSize, length FileSize, advice Advice) Errno // FDAllocate forces the allocation of space in a file. // // Note: This is similar to posix_fallocate in POSIX. FDAllocate(ctx context.Context, fd FD, offset FileSize, length FileSize) Errno // FDClose closes a file descriptor. // // Note: This is similar to close in POSIX. FDClose(ctx context.Context, fd FD) Errno // FDDataSync synchronizes the data of a file to disk. // // Note: This is similar to fdatasync in POSIX. FDDataSync(ctx context.Context, fd FD) Errno // FDStatGet gets the attributes of a file descriptor. // // Note: This returns similar flags to fcntl(fd, F_GETFL) in POSIX, as // well as additional fields. FDStatGet(ctx context.Context, fd FD) (FDStat, Errno) // FDStatSetFlags adjusts the flags associated with a file descriptor. // // Note: This is similar to fcntl(fd, F_SETFL, flags) in POSIX. FDStatSetFlags(ctx context.Context, fd FD, flags FDFlags) Errno // FDStatSetRights adjusts the rights associated with a file descriptor. // // This can only be used to remove rights, and returns ENOTCAPABLE if // called in a way that would attempt to add rights. FDStatSetRights(ctx context.Context, fd FD, rightsBase, rightsInheriting Rights) Errno // FDFileStatGet returns the attributes of an open file. FDFileStatGet(ctx context.Context, fd FD) (FileStat, Errno) // FDFileStatSetSize adjusts the size of an open file. // // If this increases the file's size, the extra bytes are filled with // zeros. // // Note: This is similar to ftruncate in POSIX. FDFileStatSetSize(ctx context.Context, fd FD, size FileSize) Errno // FDFileStatSetTimes adjusts the timestamps of an open file or directory. // // Note: This is similar to futimens in POSIX. FDFileStatSetTimes(ctx context.Context, fd FD, accessTime, modifyTime Timestamp, flags FSTFlags) Errno // FDPread reads from a file descriptor, without using and updating the // file descriptor's offset. // // On success, it returns the number of bytes read. On failure, it returns // an Errno. // // Note: This is similar to preadv in Linux (and other Unix-es). FDPread(ctx context.Context, fd FD, iovecs []IOVec, offset FileSize) (Size, Errno) // FDPreStatGet returns a description of the given pre-opened file // descriptor. FDPreStatGet(ctx context.Context, fd FD) (PreStat, Errno) // FDPreStatDirName returns a description of the given pre-opened file // descriptor. FDPreStatDirName(ctx context.Context, fd FD) (string, Errno) // FDPwrite writes from a file descriptor, without using and updating the // file descriptor's offset. // // On success, it returns the number of bytes read. On failure, it returns // an Errno. // // Note: This is similar to pwritev in Linux (and other Unix-es). // // Like Linux (and other Unix-es), any calls of pwrite (and other functions // to read or write) for a regular file by other threads in the WASI // process should not be interleaved while pwrite is executed. FDPwrite(ctx context.Context, fd FD, iovecs []IOVec, offset FileSize) (Size, Errno) // FDRead reads from a file descriptor. // // On success, it returns the number of bytes read. On failure, it returns // an Errno. // // Note: This is similar to readv in POSIX. FDRead(ctx context.Context, fd FD, iovecs []IOVec) (Size, Errno) // FDReadDir reads directory entries from a directory. // // The implementation must write entries to the provided entries buffer, // and return the number of entries written. // // The implementation must ensure that the entries fit into a buffer // with the specified size (bufferSizeBytes). It's ok if the final entry // only partially fits into such a buffer. FDReadDir(ctx context.Context, fd FD, entries []DirEntry, cookie DirCookie, bufferSizeBytes int) (int, Errno) // FDRenumber atomically replaces a file descriptor by renumbering another // file descriptor. Due to the strong focus on thread safety, this // environment does not provide a mechanism to duplicate or renumber a file // descriptor to an arbitrary number, like dup2(). This would be prone to // race conditions, as an actual file descriptor with the same number could // be allocated by a different thread at the same time. This function // provides a way to atomically renumber file descriptors, which would // disappear if dup2() were to be removed entirely. FDRenumber(ctx context.Context, from, to FD) Errno // FDSeek moves the offset of a file descriptor. // // On success, this returns the new offset of the file descriptor, relative // to the start of the file. On failure, it returns an Errno. // // Note: This is similar to lseek in POSIX. FDSeek(ctx context.Context, fd FD, offset FileDelta, whence Whence) (FileSize, Errno) // FDSync synchronizes the data and metadata of a file to disk. // // Note: This is similar to fsync in POSIX. FDSync(ctx context.Context, fd FD) Errno // FDTell returns the current offset of a file descriptor. // // Note: This is similar to lseek(fd, 0, SEEK_CUR) in POSIX. FDTell(ctx context.Context, fd FD) (FileSize, Errno) // FDWrite write to a file descriptor. // // Note: This is similar to writev in POSIX. // // Like POSIX, any calls of write (and other functions to read or write) // for a regular file by other threads in the WASI process should not be // interleaved while write is executed. FDWrite(ctx context.Context, fd FD, iovecs []IOVec) (Size, Errno) // PathCreateDirectory create a directory. // // Note: This is similar to mkdirat in POSIX. PathCreateDirectory(ctx context.Context, fd FD, path string) Errno // PathFileStatGet returns the attributes of a file or directory. // // Note: This is similar to stat in POSIX. PathFileStatGet(ctx context.Context, fd FD, lookupFlags LookupFlags, path string) (FileStat, Errno) // PathFileStatSetTimes adjusts the timestamps of a file or directory. // // Note: This is similar to utimensat in POSIX. PathFileStatSetTimes(ctx context.Context, fd FD, lookupFlags LookupFlags, path string, accessTime, modifyTime Timestamp, flags FSTFlags) Errno // PathLink creates a hard link. // // Note: This is similar to linkat in POSIX. PathLink(ctx context.Context, oldFD FD, oldFlags LookupFlags, oldPath string, newFD FD, newPath string) Errno // PathOpen opens a file or directory. // // The returned file descriptor is not guaranteed to be the lowest-numbered // file descriptor not currently open; it is randomized to prevent // applications from depending on making assumptions about indexes, since // this is error-prone in multi-threaded contexts. The returned file // descriptor is guaranteed to be less than 2**31. // // Note: This is similar to openat in POSIX. PathOpen(ctx context.Context, fd FD, dirFlags LookupFlags, path string, openFlags OpenFlags, rightsBase, rightsInheriting Rights, fdFlags FDFlags) (FD, Errno) // PathReadLink reads the contents of a symbolic link. // // The implementation must read the path into the specified buffer and then // return it. If the buffer is not large enough to hold the contents of the // symbolic link, the implementation must return ERANGE. // // Note: This is similar to readlinkat in POSIX. PathReadLink(ctx context.Context, fd FD, path string, buffer []byte) ([]byte, Errno) // PathRemoveDirectory removes a directory. // // If the directory is not empty, ENOTEMPTY is returned. // // Note: This is similar to unlinkat(fd, path, AT_REMOVEDIR) in POSIX. PathRemoveDirectory(ctx context.Context, fd FD, path string) Errno // PathRename renames a file or directory. // // Note: This is similar to renameat in POSIX. PathRename(ctx context.Context, fd FD, oldPath string, newFD FD, newPath string) Errno // PathSymlink creates a symbolic link. // // Note: This is similar to symlinkat in POSIX. PathSymlink(ctx context.Context, oldPath string, fd FD, newPath string) Errno // PathUnlinkFile unlinks a file. // // If the path refers to a directory, EISDIR is returned. // // Note: This is similar to unlinkat(fd, path, 0) in POSIX. PathUnlinkFile(ctx context.Context, fd FD, path string) Errno // PollOneOff concurrently polls for the occurrence of a set of events. // // If len(subscriptions) == 0, EINVAL is returned. // // The function writes events to the provided []Event buffer, expecting // len(events)>=len(subscriptions). PollOneOff(ctx context.Context, subscriptions []Subscription, events []Event) (int, Errno) // ProcExit terminates the process normally. // // An exit code of 0 indicates successful termination of the program. // The meanings of other values is dependent on the environment. ProcExit(ctx context.Context, exitCode ExitCode) Errno // ProcRaise sends a signal to the process of the calling thread. // // Note: This is similar to raise in POSIX. ProcRaise(ctx context.Context, signal Signal) Errno // SchedYield temporarily yields execution of the calling thread. // // Note: This is similar to sched_yield in POSIX. SchedYield(ctx context.Context) Errno // RandomGet write high-quality random data into a buffer. // // This function blocks when the implementation is unable to immediately // provide sufficient high-quality random data. This function may execute // slowly, so when large mounts of random data are required, it's // advisable to use this function to seed a pseudo-random number generator, // rather than to provide the random data directly. RandomGet(ctx context.Context, b []byte) Errno // SockAccept accepts a new incoming connection. // // Note: This is similar to accept in POSIX. SockAccept(ctx context.Context, fd FD, flags FDFlags) (FD, Errno) // SockRecv receives a message from a socket. // // On success, this returns the number of bytes read along with // output flags. On failure, this returns an Errno. // // Note: This is similar to recv in POSIX, though it also supports reading // the data into multiple buffers in the manner of readv. SockRecv(ctx context.Context, fd FD, iovecs []IOVec, flags RIFlags) (Size, ROFlags, Errno) // SockSend sends a message on a socket. // // On success, this returns the number of bytes written. On failure, this // returns an Errno. // // Note: This is similar to send in POSIX, though it also supports // writing the data from multiple buffers in the manner of writev. SockSend(ctx context.Context, fd FD, iovecs []IOVec, flags SIFlags) (Size, Errno) // SockShutdown shuts down a socket's send and/or receive channels. // // Note: This is similar to shutdown in POSIX. SockShutdown(ctx context.Context, fd FD, flags SDFlags) Errno // Close closes the System. Close(ctx context.Context) error // Register is a lower-level variant of Preopen that registers a file // descriptor. Register(hostfd int, fdstat FDStat) FD }
System is the WebAssembly System Interface (WASI).
type Tracer ¶
Tracer wraps a System to log calls.
func (*Tracer) ClockResGet ¶
func (*Tracer) ClockTimeGet ¶
func (*Tracer) EnvironSizesGet ¶
func (*Tracer) FDAllocate ¶
func (*Tracer) FDFileStatGet ¶
func (*Tracer) FDFileStatSetSize ¶
func (*Tracer) FDFileStatSetTimes ¶
func (*Tracer) FDPreStatDirName ¶
func (*Tracer) FDPreStatGet ¶
func (*Tracer) FDStatSetFlags ¶
func (*Tracer) PathCreateDirectory ¶
func (*Tracer) PathFileStatGet ¶
func (*Tracer) PathFileStatSetTimes ¶
func (*Tracer) PathReadLink ¶
func (*Tracer) PathRemoveDirectory ¶
func (*Tracer) PathRename ¶
func (*Tracer) PathSymlink ¶
func (*Tracer) PathUnlinkFile ¶
func (*Tracer) PollOneOff ¶
func (*Tracer) SockAccept ¶
func (*Tracer) SockConnect ¶
func (*Tracer) SockGetOptInt ¶
func (t *Tracer) SockGetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption) (int, Errno)
func (*Tracer) SockListen ¶
func (*Tracer) SockLocalAddress ¶
func (*Tracer) SockOpen ¶
func (t *Tracer) SockOpen(ctx context.Context, pf ProtocolFamily, socketType SocketType, protocol Protocol, rightsBase, rightsInheriting Rights) (FD, Errno)
func (*Tracer) SockPeerAddress ¶
func (*Tracer) SockRecvFrom ¶
func (*Tracer) SockSendTo ¶
func (*Tracer) SockSetOptInt ¶
func (t *Tracer) SockSetOptInt(ctx context.Context, fd FD, level SocketOptionLevel, option SocketOption, value int) Errno
type UnixAddress ¶
type UnixAddress struct {
Name string
}
func (*UnixAddress) Network ¶
func (a *UnixAddress) Network() string
func (*UnixAddress) String ¶
func (a *UnixAddress) String() string
type UserData ¶
type UserData uint64
UserData is a user-provided value that may be attached to objects that is retained when extracted from the implementation.