Documentation
¶
Index ¶
- Constants
- type Block
- type ConditionNotifier
- type Indicator
- type MulticastNotifier
- type Notifier
- type ReadableBlock
- type ReadableInfo
- type Segment
- type ShmConf
- type State
- func (s *State) CeilingMsgSize() uint64
- func (s *State) DecreaseReferenceCounts()
- func (s *State) FetchAddSeq(diff uint32) uint32
- func (s *State) IncreaseReferenceCounts()
- func (s *State) NeedRemap() bool
- func (s *State) ReferenceCounts() uint32
- func (s *State) Seq() uint32
- func (s *State) SetNeedRemap(need bool)
- type WritableBlock
- type XSISegment
- func (s *XSISegment) AcquireBlockToRead(readableBlock *ReadableBlock) bool
- func (s *XSISegment) AcquireBlockToWrite(msgSize uint64, writableBlock *WritableBlock) bool
- func (s *XSISegment) Destroy() bool
- func (s *XSISegment) OpenOnly() bool
- func (s *XSISegment) OpenOrCreate() bool
- func (s *XSISegment) ReleaseReadBlock(readableBlock *ReadableBlock)
- func (s *XSISegment) ReleaseWrittenBlock(writableBlock *WritableBlock)
- func (s *XSISegment) Remove() bool
- func (s *XSISegment) Reset()
- func (s *XSISegment) Type() string
Constants ¶
View Source
const (
BlockSize = 32
)
View Source
const IndicatorSize = 8 + kBufLength*ReadableInfoSize + 8*kBufLength
View Source
const ReadableInfoSize = 32
View Source
const StateSize = 32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
func NewBlockFromShm ¶
func (*Block) MsgInfoSize ¶
func (*Block) ReleaseReadLock ¶
func (b *Block) ReleaseReadLock()
func (*Block) ReleaseWriteLock ¶
func (b *Block) ReleaseWriteLock()
func (*Block) SetMsgInfoSize ¶
func (*Block) SetMsgSize ¶
func (*Block) TryLockForRead ¶
func (*Block) TryLockForWrite ¶
type ConditionNotifier ¶
type ConditionNotifier struct {
// contains filtered or unexported fields
}
func NewConditionNotifier ¶
func NewConditionNotifier() *ConditionNotifier
func NewConditionNotifierE ¶
func NewConditionNotifierE() (*ConditionNotifier, error)
func (*ConditionNotifier) Listen ¶
func (n *ConditionNotifier) Listen(timeoutMs int, info *ReadableInfo) bool
func (*ConditionNotifier) Notify ¶
func (n *ConditionNotifier) Notify(info *ReadableInfo) bool
func (*ConditionNotifier) Shutdown ¶
func (n *ConditionNotifier) Shutdown()
func (*ConditionNotifier) Type ¶
func (n *ConditionNotifier) Type() string
type MulticastNotifier ¶
type MulticastNotifier struct {
// contains filtered or unexported fields
}
func NewMulticastNotifier ¶
func NewMulticastNotifier() *MulticastNotifier
func NewMulticastNotifierE ¶
func NewMulticastNotifierE() (*MulticastNotifier, error)
func (*MulticastNotifier) Listen ¶
func (n *MulticastNotifier) Listen(timeoutMs int, info *ReadableInfo) bool
func (*MulticastNotifier) Notify ¶
func (n *MulticastNotifier) Notify(info *ReadableInfo) bool
func (*MulticastNotifier) Shutdown ¶
func (n *MulticastNotifier) Shutdown()
func (*MulticastNotifier) Type ¶
func (n *MulticastNotifier) Type() string
type Notifier ¶
type Notifier interface { Shutdown() Notify(info *ReadableInfo) bool Listen(timeoutMs int, info *ReadableInfo) bool Type() string }
var ConditionNotifierInstance Notifier = NewConditionNotifier()
var MulticastNotifierInstance Notifier = NewMulticastNotifier()
func NewNotifier ¶
func NewNotifier() Notifier
type ReadableBlock ¶
type ReadableBlock WritableBlock
type ReadableInfo ¶
type ReadableInfo struct { HostID uint64 BlockIndex uint32 ChannelID uint64 // contains filtered or unexported fields }
func (*ReadableInfo) Deserialize ¶
func (r *ReadableInfo) Deserialize(b []byte) bool
func (*ReadableInfo) Serialize ¶
func (r *ReadableInfo) Serialize() []byte
type Segment ¶
type Segment interface { AcquireBlockToWrite(msgSize uint64, writableBlock *WritableBlock) bool ReleaseWrittenBlock(writableBlock *WritableBlock) AcquireBlockToRead(readableBlock *ReadableBlock) bool ReleaseReadBlock(readableBlock *ReadableBlock) Destroy() bool Reset() Remove() bool OpenOnly() bool OpenOrCreate() bool Type() string }
func NewSegment ¶
type ShmConf ¶
type ShmConf struct {
// contains filtered or unexported fields
}
func NewShmConf ¶
func NewShmConf() *ShmConf
func NewShmConfByRealMsgSize ¶
func (*ShmConf) BlockBuffSize ¶
func (*ShmConf) CeilingMsgSize ¶
func (*ShmConf) ManagedShmSize ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func NewStateFromShm ¶
func (*State) CeilingMsgSize ¶
func (*State) DecreaseReferenceCounts ¶
func (s *State) DecreaseReferenceCounts()
func (*State) FetchAddSeq ¶
func (*State) IncreaseReferenceCounts ¶
func (s *State) IncreaseReferenceCounts()
func (*State) ReferenceCounts ¶
func (*State) SetNeedRemap ¶
type WritableBlock ¶
type XSISegment ¶
type XSISegment struct {
// contains filtered or unexported fields
}
func NewXSISegment ¶
func NewXSISegment(channelID uint64) *XSISegment
func (*XSISegment) AcquireBlockToRead ¶
func (s *XSISegment) AcquireBlockToRead(readableBlock *ReadableBlock) bool
func (*XSISegment) AcquireBlockToWrite ¶
func (s *XSISegment) AcquireBlockToWrite(msgSize uint64, writableBlock *WritableBlock) bool
func (*XSISegment) Destroy ¶
func (s *XSISegment) Destroy() bool
func (*XSISegment) OpenOnly ¶
func (s *XSISegment) OpenOnly() bool
func (*XSISegment) OpenOrCreate ¶
func (s *XSISegment) OpenOrCreate() bool
func (*XSISegment) ReleaseReadBlock ¶
func (s *XSISegment) ReleaseReadBlock(readableBlock *ReadableBlock)
func (*XSISegment) ReleaseWrittenBlock ¶
func (s *XSISegment) ReleaseWrittenBlock(writableBlock *WritableBlock)
func (*XSISegment) Remove ¶
func (s *XSISegment) Remove() bool
func (*XSISegment) Reset ¶
func (s *XSISegment) Reset()
func (*XSISegment) Type ¶
func (s *XSISegment) Type() string
Click to show internal directories.
Click to hide internal directories.