Categorygithub.com/softwaredefinedbuildings/btrdb-go
modulepackage
4.15.3+incompatible
Repository: https://github.com/softwaredefinedbuildings/btrdb-go.git
Documentation: pkg.go.dev

# README

BTrDB golang bindings

GoDoc

These are the go BTrDB bindings. This branch is compatible with version 4, the recent rewrite of BTrDB.

You can read the API documentation and code examples by clicking the godoc button above. To import this package in your code, add

import "gopkg.in/BTrDB/btrdb.v4"

For more information about installing BTrDB, look at https://docs.smartgrid.store

# Packages

No description provided by the author
Package grpcinterface is a reverse proxy.
No description provided by the author

# Functions

Connect takes a list of endpoints and returns a BTrDB handle.Note that only a single endpoint is technically required, but havingmore endpoints will make the initial connection more robust to clusterchanges.
ConnectAuth takes an API key and a list of endpoints and returns a BTrDB handle.Note that only a single endpoint is technically required, but havingmore endpoints will make the initial connection more robust to clusterchanges.
ConnectEndpoint is a low level call that connects to a single BTrDBserver.
ConnectEndpointAuth is a low level call that connects to a single BTrDBserver.
EndpointsFromEnv reads the environment variable BTRDB_ENDPOINTS of the format server:port,server:port,server:portand returns it as a string slice.
OptKV is a utility function for use in SetAnnotations or LookupStreams thatturns a list of arguments into a map[string]*string.
ToCodedError can be used to convert any error into a CodedError.

# Constants

LatestVersion can be passed to any functions taking a version to use thelatest version of that stream.

# Variables

ErrorClusterDegraded is returned when a write operation on an unmapped UUID is attempted.generally the same operation will succeed if attempted once the cluster has recovered.
ErrorDisconnected is returned when operations are attempted after Disconnect()is called.
ErrorWrongArgs is returned from API functions if the parameters are nonsensical.

# Structs

BTrDB is the main object you should use to interact with BTrDB.
No description provided by the author
CodedError is an error that contains a numeric code.
Endpoint is a low level connection to a single server.
The MASH struct (Master Allocation by Stable Hashing) contains informationabout the cluster and which fraction of the uuid space is being served bywhich endpoints.
RawPoint represents a single timestamped value.
StatPoint represents a statistical summary of a window.
Stream is a handle on a Stream in BTrDB.

# Type aliases

AnnotationVersion is the version of a stream annotation.
M is an alias to neaten code specifying tags: btrdb.LookupStream(ctx, "mycollection", btrdb.M{"tagkey":"tagval"}).