Class: LS4::FileUpdateLog
- Inherits:
-
UpdateLogService
- Object
- EventBus::Singleton
- Service
- UpdateLogService
- LS4::FileUpdateLog
- Defined in:
- lib/ls4/service/ulog_file.rb
Defined Under Namespace
Classes: Header, LogFile, Record, RecordRef
Constant Summary collapse
- HEADER_SIZE =
File format:
-------
——--------
—-…+— | 8 | 8 | 8 | 48 | records…-------
——--------
—-…+— magic “SoULog00”start- pos reserved...
Record format:
------
——-------...
|vbcode|msgpack| raw |------
——-------...
record-sizemetadata data | | |-----------------| record-size
64
- MAGICK =
"SoULog00"
Instance Method Summary collapse
Methods inherited from UpdateLogService
Methods inherited from Service
Methods included from EventBus::SingletonMixin
#ebus_bind!, #ebus_connect, extended
Methods included from EventBus::BusMixin
#ebus_all_slots, #ebus_disconnect!
Methods included from EventBus::DeclarerBase::Methods
#connect, #ebus_all_slots, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots
Methods included from EventBus::DeclarerBase
Instance Method Details
#append(data, &block) ⇒ Object
300 301 302 303 304 305 |
# File 'lib/ls4/service/ulog_file.rb', line 300 def append(data, &block) # FIXME rotation atime = next_time atime = @f.append(atime, data, &block) atime end |
#close ⇒ Object
296 297 298 |
# File 'lib/ls4/service/ulog_file.rb', line 296 def close @f.close end |
#get(pos) ⇒ Object
307 308 309 310 |
# File 'lib/ls4/service/ulog_file.rb', line 307 def get(pos) # FIXME rotation @f.get(pos) end |