inmem

package
v0.0.0-...-ed41c2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeBufferOverflow = 200
)

Variables

This section is empty.

Functions

func AddStats

func AddStats(m map[string]string)

AddStats fills stats keys for inmem storage

func UpdateDestinationsConfig

func UpdateDestinationsConfig(m destination.Map)

UpdateDestinationsConfig accepts destination.Map and starts new flushers if neccessary

func Write

func Write(table string, data []byte, rowBinary bool) error

Write adds data to per-table buffer if there is enough capacity. locks are taken in the following order:

  • map.RLock()
  • el = map[table]
  • el.Lock()
  • map.RUnlock()
  • doSometing(el)
  • el.Unlock()

It is done because map is periodically swapped to empty map and we need to ensure that we finished writing to el that was taken after map was unlocked.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL