Documentation ¶
Index ¶
- Constants
- func BoundsCheck(index int32, length int32, myLength int32)
- type Bool
- type Buffer
- func (buf *Buffer) Capacity() int32
- func (buf *Buffer) CompareAndSetInt32(offset int32, expectedValue, updateValue int32) bool
- func (buf *Buffer) CompareAndSetInt64(offset int32, expectedValue, updateValue int64) bool
- func (buf *Buffer) Fill(b uint8)
- func (buf *Buffer) GetAndAddInt64(offset int32, delta int64) int64
- func (buf *Buffer) GetBytes(offset int32, b []byte)
- func (buf *Buffer) GetBytesArray(offset int32, length int32) []byte
- func (buf *Buffer) GetInt32(offset int32) int32
- func (buf *Buffer) GetInt32Volatile(offset int32) int32
- func (buf *Buffer) GetInt64(offset int32) int64
- func (buf *Buffer) GetInt64Volatile(offset int32) int64
- func (buf *Buffer) GetUInt16(offset int32) uint16
- func (buf *Buffer) GetUInt8(offset int32) uint8
- func (buf *Buffer) Ptr() unsafe.Pointer
- func (buf *Buffer) PutBytes(index int32, srcBuffer *Buffer, srcint32 int32, length int32)
- func (buf *Buffer) PutBytesArray(index int32, arr *[]byte, srcint32 int32, length int32)
- func (buf *Buffer) PutInt32(offset int32, value int32)
- func (buf *Buffer) PutInt32Ordered(offset int32, value int32)
- func (buf *Buffer) PutInt64(offset int32, value int64)
- func (buf *Buffer) PutInt64Ordered(offset int32, value int64)
- func (buf *Buffer) PutInt8(offset int32, value int8)
- func (buf *Buffer) PutIntOrdered(offset int32, value int)
- func (buf *Buffer) PutUInt16(offset int32, value uint16)
- func (buf *Buffer) PutUInt8(offset int32, value uint8)
- func (buf *Buffer) Wrap(buffer unsafe.Pointer, length int32) *Buffer
- func (buf *Buffer) WriteBytes(dest *bytes.Buffer, offset int32, length int32)
- type Int
- type Long
Constants ¶
View Source
const ( // True value for atomic.Bool True int32 = 1 // False value for atomic.Bool False int32 = 0 )
Variables ¶
This section is empty.
Functions ¶
func BoundsCheck ¶
BoundsCheck is helper function to make sure buffer writes and reads to not go out of bounds on stated buffer capacity
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
Bool is an atomic boolean implementation used by aeron-go
func (*Bool) CompareAndSet ¶
CompareAndSet performs an atomic CAS operation on this variable
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is the equivalent of AtomicBuffer used by Aeron Java and C++ implementations. It provides atomic operations on a raw byte buffer wrapped by the structure.
func MakeBuffer ¶
func MakeBuffer(args ...interface{}) *Buffer
MakeBuffer takes a variety of argument options and returns a new atomic.Buffer to the best of its ability
Options for calling MakeAtomicBuffer(Pointer) MakeAtomicBuffer([]byte) MakeAtomicBuffer(Pointer, len) MakeAtomicBuffer([]byte, len)
func (*Buffer) CompareAndSetInt32 ¶
func (*Buffer) CompareAndSetInt64 ¶
func (*Buffer) Fill ¶
Fill the buffer with the value of the argument byte. Generally used for initialization, since it's somewhat expensive.
func (*Buffer) GetInt32Volatile ¶
func (*Buffer) GetInt64Volatile ¶
func (*Buffer) PutBytesArray ¶
func (*Buffer) PutInt32Ordered ¶
func (*Buffer) PutInt64Ordered ¶
func (*Buffer) PutIntOrdered ¶
Click to show internal directories.
Click to hide internal directories.