Documentation
¶
Index ¶
- Constants
- type Counter
- type MetaDataFlyweight
- type ReadableCounter
- type Reader
- func (reader *Reader) FindCounter(typeId int32, keyFilter func(keyBuffer *atomic.Buffer) bool) int32
- func (reader *Reader) GetKeyPartInt32(counterId int32, offset int32) (int32, error)
- func (reader *Reader) GetKeyPartInt64(counterId int32, offset int32) (int64, error)
- func (reader *Reader) Scan(cb func(Counter))
Constants ¶
View Source
const ( CncFile = "cnc.dat" CurrentCncVersion int32 = 512 // util.SemanticVersionCompose(0, 2, 0) )
View Source
const COUNTER_LENGTH = util.CacheLineLength * 2
View Source
const FULL_LABEL_LENGTH = util.CacheLineLength * 6
View Source
const KEY_OFFSET = 16
View Source
const LABEL_OFFSET = util.CacheLineLength * 2
View Source
const MAX_KEY_LENGTH = (util.CacheLineLength * 2) - (util.SizeOfInt32 * 2) - util.SizeOfInt64
View Source
const METADATA_LENGTH = LABEL_OFFSET + FULL_LABEL_LENGTH
View Source
const NullCounterId = int32(-1)
View Source
const RECORD_ALLOCATED int32 = 1
View Source
const RECORD_RECLAIMED int32 = -1
View Source
const RECORD_UNUSED int32 = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetaDataFlyweight ¶
type MetaDataFlyweight struct { flyweight.FWBase CncVersion flyweight.Int32Field ToDriverBufLen flyweight.Int32Field ToClientBufLen flyweight.Int32Field ClientLivenessTo flyweight.Int64Field DriverStartTimestamp flyweight.Int64Field DriverPid flyweight.Int64Field ToDriverBuf flyweight.RawDataField ToClientsBuf flyweight.RawDataField MetaDataBuf flyweight.RawDataField ValuesBuf flyweight.RawDataField ErrorBuf flyweight.RawDataField // contains filtered or unexported fields }
*
- Description of the command and control file used between driver and clients.
- <p>
- File Layout
- <pre>
- +-----------------------------+
- | Meta Data |
- +-----------------------------+
- | to-driver Buffer |
- +-----------------------------+
- | to-clients Buffer |
- +-----------------------------+
- | Counters Metadata Buffer |
- +-----------------------------+
- | Counters Values Buffer |
- +-----------------------------+
- | Error Log |
- +-----------------------------+
- </pre>
- <p>
- Meta Data Layout (CnC Version 0.2.0 => 512)
- <pre>
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Aeron CnC Version |
- +---------------------------------------------------------------+
- | to-driver buffer length |
- +---------------------------------------------------------------+
- | to-clients buffer length |
- +---------------------------------------------------------------+
- | Counters Metadata buffer length |
- +---------------------------------------------------------------+
- | Counters Values buffer length |
- +---------------------------------------------------------------+
- | Error Log buffer length |
- +---------------------------------------------------------------+
- | Client Liveness Timeout |
- | |
- +---------------------------------------------------------------+
- | Driver Start Timestamp |
- | |
- +---------------------------------------------------------------+
- | Driver PID |
- | |
- +---------------------------------------------------------------+
- </pre> *
- See also <a href="https://github.com/real-logic/aeron/blob/master/aeron-client/src/main/cpp/CncFileDescriptor.h">CncFileDescriptor.h</a>.
type ReadableCounter ¶ added in v1.0.5
type ReadableCounter struct { Reader *Reader CounterId int32 // contains filtered or unexported fields }
func NewReadableCounter ¶ added in v1.0.5
func NewReadableCounter(reader *Reader, counterId int32) (*ReadableCounter, error)
func (*ReadableCounter) Get ¶ added in v1.0.5
func (rc *ReadableCounter) Get() int64
func (*ReadableCounter) GetWeak ¶ added in v1.0.5
func (rc *ReadableCounter) GetWeak() int64
func (*ReadableCounter) Label ¶ added in v1.0.5
func (rc *ReadableCounter) Label() string
func (*ReadableCounter) State ¶ added in v1.0.5
func (rc *ReadableCounter) State() int32
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) FindCounter ¶ added in v1.0.8
func (*Reader) GetKeyPartInt32 ¶
GetKeyPartInt32 returns an int32 portion of the key at the specified offset
func (*Reader) GetKeyPartInt64 ¶ added in v1.0.5
GetKeyPartInt64 returns an int64 portion of the key at the specified offset
Click to show internal directories.
Click to hide internal directories.