Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Batch represents batch for collecting data before inserting into db
func (*Batch) HasExpired ¶
HasExpired checks if the batch exceeds its max duration time
func (*Batch) TryAcquire ¶
TryAcquire checks if batch can be used for collecting data
type Collection ¶
Collection represents slice to collecting data
func NewCollection ¶
func NewCollection(rType reflect.Type) *Collection
NewCollection creates a new collection
func (*Collection) Append ¶
func (c *Collection) Append(value interface{})
Append adds item into collection
func (*Collection) Reset ¶
func (c *Collection) Reset()
Reset set length collection to 0 (doesn't change capacity)
func (*Collection) Unwrap ¶ added in v0.4.1
func (c *Collection) Unwrap() interface{}
Unwrap unwrap collection
func (*Collection) ValuePointerAt ¶
func (c *Collection) ValuePointerAt(index int) interface{}
ValuePointerAt returns item at given index
Click to show internal directories.
Click to hide internal directories.