util

package
v0.0.0-...-fff4e01 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CenterFrequencyAndSampleRate

func CenterFrequencyAndSampleRate(low, high int) (center, bw int)

func FrequencyRange

func FrequencyRange(freqs ...int) (low, high int)

func SampleRate

func SampleRate(low, high int) int

Yes this is silly but I just want a standardized place for doing it.

func TimeOperationMicroseconds

func TimeOperationMicroseconds(op func()) int64

Types

type MockWriteAPI

type MockWriteAPI struct{}

func (*MockWriteAPI) Close

func (m *MockWriteAPI) Close()

Flushes all pending writes and stop async processes. After this the Write client cannot be used

func (*MockWriteAPI) Errors

func (m *MockWriteAPI) Errors() <-chan error

Errors returns a channel for reading errors which occurs during async writes. Must be called before performing any writes for errors to be collected. The chan is unbuffered and must be drained or the writer will block.

func (*MockWriteAPI) Flush

func (m *MockWriteAPI) Flush()

Flush forces all pending writes from the buffer to be sent

func (*MockWriteAPI) WritePoint

func (m *MockWriteAPI) WritePoint(point *write.Point)

WritePoint writes asynchronously Point into bucket. WritePoint adds Point into the buffer which is sent on the background when it reaches the batch size. Blocking alternative is available in the WriteApiBlocking interface

func (*MockWriteAPI) WriteRecord

func (m *MockWriteAPI) WriteRecord(line string)

WriteRecord writes asynchronously line protocol record into bucket. WriteRecord adds record into the buffer which is sent on the background when it reaches the batch size. Blocking alternative is available in the WriteApiBlocking interface

Jump to

Keyboard shortcuts

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