Documentation
¶
Index ¶
- Variables
- type SharedMemory
- func (sm *SharedMemory) Close() error
- func (sm *SharedMemory) ID() int
- func (sm *SharedMemory) Open() error
- func (sm *SharedMemory) Read(p []byte) (n int, err error)
- func (sm *SharedMemory) ReadAt(p []byte, off int64) (n int, err error)
- func (sm *SharedMemory) Size() int
- func (sm *SharedMemory) Write(p []byte) (n int, err error)
- func (sm *SharedMemory) WriteAt(p []byte, off int64) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorGivenSliceBiggerThanData = fmt.Errorf("shm: p is larger than SharedMemory size")
View Source
var ErrorGivenSliceTooBig = fmt.Errorf("shm: slice of bytes provided too big to write")
Functions ¶
This section is empty.
Types ¶
type SharedMemory ¶
type SharedMemory struct {
// contains filtered or unexported fields
}
SharedMemory is a Wrapper around SysVShm, and is not safe for concurrent access
func New ¶
func New(id int, size int) SharedMemory
New SharedMemory using id, if id is 0, make one there
func (*SharedMemory) Close ¶
func (sm *SharedMemory) Close() error
Close *MUST* be called after SharedMemory is finished being used
func (*SharedMemory) ID ¶
func (sm *SharedMemory) ID() int
func (*SharedMemory) Open ¶
func (sm *SharedMemory) Open() error
Open the SharedMemory (shm) segment, will return nil if called while already open
func (*SharedMemory) ReadAt ¶
func (sm *SharedMemory) ReadAt(p []byte, off int64) (n int, err error)
func (*SharedMemory) Size ¶
func (sm *SharedMemory) Size() int
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
multierror
Package multierror contains a Multierror for combining multiple errors and compiling with errors.Is
|
Package multierror contains a Multierror for combining multiple errors and compiling with errors.Is |
Click to show internal directories.
Click to hide internal directories.