Documentation ¶
Index ¶
Constants ¶
View Source
const SpinMask = 1024 - 1 // arbitrary; we'll want to experiment with different values
Variables ¶
View Source
var ErrMinimumReservationSize = errors.New("the minimum reservation size is 1 slot")
View Source
var (
ErrNotPowerOf2 = errors.New("not power of 2")
)
Functions ¶
This section is empty.
Types ¶
type ConsumerReader ¶
type ConsumerReader struct {
// contains filtered or unexported fields
}
func (*ConsumerReader) Close ¶
func (r *ConsumerReader) Close() error
func (*ConsumerReader) Read ¶
func (r *ConsumerReader) Read()
type Cursor ¶
type Cursor cpu.CacheLinePad
Cursor prevent false sharing of the sequence cursor by padding the CPU cache line
type Disruptor ¶
func NewDisruptor ¶
type Option ¶
type Option func(*Wireup)
func WithCapacity ¶
func WithConsumerGroup ¶
func WithWaitStrategy ¶
type SPSequencer ¶
type SPSequencer struct {
// contains filtered or unexported fields
}
func (*SPSequencer) HasCapacity ¶
func (s *SPSequencer) HasCapacity(required int64, doStore bool) bool
type UnsafeRing ¶
type UnsafeRing[T any] struct { // contains filtered or unexported fields }
func NewUnsafeRing ¶
func NewUnsafeRing[T any](capacity int64) (*UnsafeRing[T], error)
func (*UnsafeRing[T]) Close ¶
func (u *UnsafeRing[T]) Close() error
func (*UnsafeRing[T]) Get ¶
func (r *UnsafeRing[T]) Get(sequence int64) *T
func (*UnsafeRing[T]) Index ¶
func (r *UnsafeRing[T]) Index(sequence int64) int64
func (*UnsafeRing[T]) Put ¶
func (r *UnsafeRing[T]) Put(sequence int64, value T)
Click to show internal directories.
Click to hide internal directories.