Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractNumericValFloat32(v interface{}) (float32, bool)
- func ExtractNumericValFloat64(v interface{}) (float64, bool)
- func IsValidFloat32(val float64) bool
- type BoltBucketImpl
- func (b *BoltBucketImpl) CreateBucketIfNotExists(name []byte) (*BoltBucketImpl, error)
- func (b *BoltBucketImpl) ForEach(fn func(key []byte, value []byte) error, reader FileReader) error
- func (b *BoltBucketImpl) Get(key []byte, reader FileReader) ([]byte, error)
- func (b *BoltBucketImpl) GetBucket(name []byte) *BoltBucketImpl
- func (b *BoltBucketImpl) Put(key []byte, value []byte, writer FileWriter) error
- type BoltTxImpl
- type FileReader
- type FileWriter
- type RootBoltImpl
Constants ¶
const DefaultFileCallbackId = ""
Variables ¶
var ( MarshalJSON = json.Marshal UnmarshalJSON = json.Unmarshal )
Should only be overwritten during process init()'ialization.
var ( // Bolt keys BoltSnapshotsBucket = []byte{'s'} BoltTrainerKey = []byte{'t'} BoltTrainCompleteKey = []byte{'c'} BoltTrainedSamplesKey = []byte{'n'} BoltPathKey = []byte{'p'} BoltDeletedKey = []byte{'d'} BoltInternalKey = []byte{'i'} BoltMetaDataKey = []byte{'m'} BoltMetaDataSegmentTypeKey = []byte("type") BoltMetaDataSegmentVersionKey = []byte("version") BoltMetaDataTimeStamp = []byte("timeStamp") BoltStatsKey = []byte("stats") BoltUpdatedFieldsKey = []byte("fields") TotBytesWrittenKey = []byte("TotBytesWritten") BoltMetaDataFileWriterIDKey = []byte("fileWriterID") MappingInternalKey = []byte("_mapping") )
Functions ¶
func ExtractNumericValFloat32 ¶ added in v2.4.0
extract numeric value (if possible) and returns a float32
func ExtractNumericValFloat64 ¶ added in v2.4.0
extract numeric value (if possible) and returns a float64
func IsValidFloat32 ¶ added in v2.4.1
Types ¶
type BoltBucketImpl ¶ added in v2.6.0
wrapper around bolt.Bucket
func (*BoltBucketImpl) CreateBucketIfNotExists ¶ added in v2.6.0
func (b *BoltBucketImpl) CreateBucketIfNotExists(name []byte) (*BoltBucketImpl, error)
func (*BoltBucketImpl) ForEach ¶ added in v2.6.0
func (b *BoltBucketImpl) ForEach(fn func(key []byte, value []byte) error, reader FileReader) error
Process values during ForEach if the bucket name or key is in the boltKeysProcessed map
func (*BoltBucketImpl) Get ¶ added in v2.6.0
func (b *BoltBucketImpl) Get(key []byte, reader FileReader) ([]byte, error)
Process values during Put/Get if the bucket name or key is in the boltKeysProcessed map
func (*BoltBucketImpl) GetBucket ¶ added in v2.6.0
func (b *BoltBucketImpl) GetBucket(name []byte) *BoltBucketImpl
func (*BoltBucketImpl) Put ¶ added in v2.6.0
func (b *BoltBucketImpl) Put(key []byte, value []byte, writer FileWriter) error
Process values during Put/Get if the bucket name or key is in the boltKeysProcessed map
type BoltTxImpl ¶ added in v2.6.0
wrapper around bolt.Tx
func (*BoltTxImpl) Bucket ¶ added in v2.6.0
func (tx *BoltTxImpl) Bucket(name []byte) *BoltBucketImpl
func (*BoltTxImpl) CreateBucketIfNotExists ¶ added in v2.6.0
func (tx *BoltTxImpl) CreateBucketIfNotExists(name []byte) (*BoltBucketImpl, error)
type FileReader ¶ added in v2.6.0
func NewFileReader ¶ added in v2.6.0
func NewFileReader(id string, context []byte) (FileReader, error)
type FileWriter ¶ added in v2.6.0
FileWriter and FileReader interfaces are wrappers around the callback functions provided by the user. They provide a convenient way to apply the callbacks to data being written to or read from a file. They also store the id the callbacks, which can be useful for managing state across multiple reads and writes.
func NewFileWriter ¶ added in v2.6.0
func NewFileWriter(context []byte) (FileWriter, error)
type RootBoltImpl ¶ added in v2.6.0
wrapper around bolt.DB
func (*RootBoltImpl) Begin ¶ added in v2.6.0
func (r *RootBoltImpl) Begin(writable bool) (*BoltTxImpl, error)
func (*RootBoltImpl) Update ¶ added in v2.6.0
func (r *RootBoltImpl) Update(fn func(*BoltTxImpl) error) error
func (*RootBoltImpl) View ¶ added in v2.6.0
func (r *RootBoltImpl) View(fn func(*BoltTxImpl) error) error