cdata

package
v0.0.0-...-3053663 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenRrdRawFile

func OpenRrdRawFile(name string, readOnly bool) (*rrd.Rrd, error)

Types

type RawDataFile

type RawDataFile struct {
	// contains filtered or unexported fields
}

RawDataFile Helper to access files created from C code by directly mapping structs Honours byte order as well as byte alignment

func OpenRawDataFile

func OpenRawDataFile(name string, readOnly bool, byteOrder binary.ByteOrder, byteAlignment uint64, valueSize int) (*RawDataFile, error)

Open a CDataFile

func (*RawDataFile) BytesToUnivals

func (f *RawDataFile) BytesToUnivals(data []byte) []unival

func (*RawDataFile) Close

func (f *RawDataFile) Close() error

Close the CDataFile

func (*RawDataFile) Reader

func (f *RawDataFile) Reader(startPosition uint64) *RawDataReader

func (*RawDataFile) UnivalsToBytes

func (f *RawDataFile) UnivalsToBytes(univals []unival) []byte

func (*RawDataFile) ValueSize

func (f *RawDataFile) ValueSize() uint64

func (*RawDataFile) Writer

func (f *RawDataFile) Writer(startPosition uint64) *RawDataWriter

type RawDataReader

type RawDataReader struct {
	*RawDataFile
	// contains filtered or unexported fields
}

func (*RawDataReader) CurPosition

func (f *RawDataReader) CurPosition() uint64

func (*RawDataReader) ReadBytes

func (f *RawDataReader) ReadBytes(len int) ([]byte, error)

func (*RawDataReader) ReadCString

func (f *RawDataReader) ReadCString(maxLen int) (string, error)

func (*RawDataReader) ReadDouble

func (f *RawDataReader) ReadDouble() (float64, error)

func (*RawDataReader) ReadDoubles

func (f *RawDataReader) ReadDoubles(buffer []float64) error

func (*RawDataReader) ReadUnival

func (f *RawDataReader) ReadUnival() (unival, error)

func (*RawDataReader) ReadUnivals

func (f *RawDataReader) ReadUnivals(count int) ([]unival, error)

func (*RawDataReader) ReadUnsignedLong

func (f *RawDataReader) ReadUnsignedLong() (uint64, error)

func (*RawDataReader) Seek

func (f *RawDataReader) Seek(offset uint64)

type RawDataWriter

type RawDataWriter struct {
	*RawDataFile
	// contains filtered or unexported fields
}

func (*RawDataWriter) CurPosition

func (f *RawDataWriter) CurPosition() uint64

func (*RawDataWriter) Seek

func (f *RawDataWriter) Seek(offset uint64)

func (*RawDataWriter) WriteBytes

func (f *RawDataWriter) WriteBytes(data []byte) error

func (*RawDataWriter) WriteCString

func (f *RawDataWriter) WriteCString(str string, maxLen int) error

func (*RawDataWriter) WriteDouble

func (f *RawDataWriter) WriteDouble(val float64) error

func (*RawDataWriter) WriteDoubles

func (f *RawDataWriter) WriteDoubles(vals []float64) error

func (*RawDataWriter) WriteUnival

func (f *RawDataWriter) WriteUnival(val unival) error

func (*RawDataWriter) WriteUnivals

func (f *RawDataWriter) WriteUnivals(univals []unival) error

func (*RawDataWriter) WriteUnsignedLong

func (f *RawDataWriter) WriteUnsignedLong(val uint64) error

type RrdRawFile

type RrdRawFile struct {
	// contains filtered or unexported fields
}

func (*RrdRawFile) Close

func (f *RrdRawFile) Close()

func (*RrdRawFile) DatasourceTypes

func (f *RrdRawFile) DatasourceTypes() []string

func (*RrdRawFile) LastUpdate

func (f *RrdRawFile) LastUpdate() time.Time

func (*RrdRawFile) ReadDatasourceParams

func (f *RrdRawFile) ReadDatasourceParams(index int, params interface{}) error

func (*RrdRawFile) ReadRraParams

func (f *RrdRawFile) ReadRraParams(index int, params interface{}) error

func (*RrdRawFile) RowIterator

func (f *RrdRawFile) RowIterator(rraIndex int) (rrd.RraRowIterator, error)

func (*RrdRawFile) RraTypes

func (f *RrdRawFile) RraTypes() []string

func (*RrdRawFile) Step

func (f *RrdRawFile) Step() time.Duration

func (*RrdRawFile) StoreDatasourceParams

func (f *RrdRawFile) StoreDatasourceParams(index int, params interface{}) error

func (*RrdRawFile) StoreLastUpdate

func (f *RrdRawFile) StoreLastUpdate(lastUpdate time.Time) error

func (*RrdRawFile) StoreRow

func (f *RrdRawFile) StoreRow(rraIndex int, row []float64) error

func (*RrdRawFile) StoreRraParams

func (f *RrdRawFile) StoreRraParams(index int, params interface{}) error

func (*RrdRawFile) StoreRraPtrs

func (f *RrdRawFile) StoreRraPtrs() error

func (*RrdRawFile) Version

func (f *RrdRawFile) Version() uint16

Jump to

Keyboard shortcuts

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