lumbermill: Index | Files

package influxdb

import ""


Package Files

influxdb.go series.go


const (
    UDPMaxMessageSize = 2048

type Client Uses

type Client struct {
    // contains filtered or unexported fields

func NewClient Uses

func NewClient(config *ClientConfig) (*Client, error)

func (*Client) AlterDatabasePrivilege Uses

func (self *Client) AlterDatabasePrivilege(database, name string, isAdmin bool, permissions ...string) error

func (*Client) AuthenticateClusterAdmin Uses

func (self *Client) AuthenticateClusterAdmin(username, password string) error

func (*Client) AuthenticateDatabaseUser Uses

func (self *Client) AuthenticateDatabaseUser(database, username, password string) error

func (*Client) ChangeClusterAdminPassword Uses

func (self *Client) ChangeClusterAdminPassword(name, newPassword string) error

Change the cluster admin password

func (*Client) ChangeDatabaseUser Uses

func (self *Client) ChangeDatabaseUser(database, name, newPassword string, isAdmin bool, newPermissions ...string) error

Change the user password, adming flag and optionally permissions

func (*Client) CreateClusterAdmin Uses

func (self *Client) CreateClusterAdmin(name, password string) error

func (*Client) CreateDatabase Uses

func (self *Client) CreateDatabase(name string) error

func (*Client) CreateDatabaseUser Uses

func (self *Client) CreateDatabaseUser(database, name, password string, permissions ...string) error

Creates a new database user for the given database. permissions can be omitted in which case the user will be able to read and write to all time series. If provided, there should be two strings, the first for read and the second for write. The strings are regexes that are used to match the time series name to determine whether the user has the ability to read/write to the given time series.

client.CreateDatabaseUser("db", "user", "pass")
// the following user cannot read from any series and can write
// to the limited time series only
client.CreateDatabaseUser("db", "limited", "pass", "^$", "limited")

func (*Client) CreateShardSpace Uses

func (self *Client) CreateShardSpace(space *ShardSpace) error

Added to InfluxDB in 0.8.0

func (*Client) DeleteClusterAdmin Uses

func (self *Client) DeleteClusterAdmin(name string) error

func (*Client) DeleteContinuousQueries Uses

func (self *Client) DeleteContinuousQueries(id int) error

func (*Client) DeleteDatabase Uses

func (self *Client) DeleteDatabase(name string) error

func (*Client) DeleteDatabaseUser Uses

func (self *Client) DeleteDatabaseUser(database, name string) error

func (*Client) DisableCompression Uses

func (self *Client) DisableCompression()

func (*Client) DropShard Uses

func (self *Client) DropShard(id uint32, serverIds []uint32) error

func (*Client) DropShardSpace Uses

func (self *Client) DropShardSpace(database, name string) error

Added to InfluxDB in 0.8.0

func (*Client) GetClusterAdminList Uses

func (self *Client) GetClusterAdminList() ([]map[string]interface{}, error)

func (*Client) GetContinuousQueries Uses

func (self *Client) GetContinuousQueries() ([]map[string]interface{}, error)

func (*Client) GetDatabaseList Uses

func (self *Client) GetDatabaseList() ([]map[string]interface{}, error)

func (*Client) GetDatabaseUserList Uses

func (self *Client) GetDatabaseUserList(database string) ([]map[string]interface{}, error)

func (*Client) GetShardSpaces Uses

func (self *Client) GetShardSpaces() ([]*ShardSpace, error)

Added to InfluxDB in 0.8.0

func (*Client) GetShards Uses

func (self *Client) GetShards() (*LongTermShortTermShards, error)

func (*Client) Ping Uses

func (self *Client) Ping() error

func (*Client) Query Uses

func (self *Client) Query(query string, precision ...TimePrecision) ([]*Series, error)

func (*Client) QueryWithNumbers Uses

func (self *Client) QueryWithNumbers(query string, precision ...TimePrecision) ([]*Series, error)

func (*Client) RemoveServer Uses

func (self *Client) RemoveServer(id int) error

func (*Client) Servers Uses

func (self *Client) Servers() ([]map[string]interface{}, error)

func (*Client) UpdateClusterAdmin Uses

func (self *Client) UpdateClusterAdmin(name, password string) error

func (*Client) UpdateDatabaseUser Uses

func (self *Client) UpdateDatabaseUser(database, name, password string) error

func (*Client) UpdateDatabaseUserPermissions Uses

func (self *Client) UpdateDatabaseUserPermissions(database, name, readPermission, writePermissions string) error

func (*Client) WriteSeries Uses

func (self *Client) WriteSeries(series []*Series) error

func (*Client) WriteSeriesOverUDP Uses

func (self *Client) WriteSeriesOverUDP(series []*Series) error

func (*Client) WriteSeriesWithTimePrecision Uses

func (self *Client) WriteSeriesWithTimePrecision(series []*Series, timePrecision TimePrecision) error

type ClientConfig Uses

type ClientConfig struct {
    Host       string
    Username   string
    Password   string
    Database   string
    HttpClient *http.Client
    IsSecure   bool
    IsUDP      bool

type LongTermShortTermShards Uses

type LongTermShortTermShards struct {
    // Long term shards, (doesn't get populated for version >= 0.8.0)
    LongTerm []*Shard `json:"longTerm"`
    // Short term shards, (doesn't get populated for version >= 0.8.0)
    ShortTerm []*Shard `json:"shortTerm"`
    // All shards in the system (Long + Short term shards for version < 0.8.0)
    All []*Shard `json:"-"`

type Series Uses

type Series struct {
    Name    string          `json:"name"`
    Columns []string        `json:"columns"`
    Points  [][]interface{} `json:"points"`

func (*Series) GetColumns Uses

func (self *Series) GetColumns() []string

func (*Series) GetName Uses

func (self *Series) GetName() string

func (*Series) GetPoints Uses

func (self *Series) GetPoints() [][]interface{}

type Shard Uses

type Shard struct {
    Id        uint32   `json:"id"`
    EndTime   int64    `json:"endTime"`
    StartTime int64    `json:"startTime"`
    ServerIds []uint32 `json:"serverIds"`
    SpaceName string   `json:"spaceName"`
    Database  string   `json:"database"`

type ShardSpace Uses

type ShardSpace struct {
    // required, must be unique within in the cluster
    Name string
    // optional, if they don't set this shard space will get evaluated for every database
    Database string
    // this is optional, if they don't set it, we'll set to /.*/
    Regex string
    // a duration (24h, 365d) this is optional, if they don't set it, it will default to the storage.dir in the config
    RetentionPolicy string
    // this is required. Should be something like 1h, 4h, 1d, 7d, 30d. Less than the retention policy by about a factor of 10
    ShardDuration string
    // how many servers should have a copy of shards in this space
    ReplicationFactor uint32
    // how many shards should be created for each block of time. Series will be distributed across this split
    Split uint32

type ShardSpaceCollection Uses

type ShardSpaceCollection struct {
    ShardSpaces []ShardSpace

type TimePrecision Uses

type TimePrecision string
const (
    Second      TimePrecision = "s"
    Millisecond TimePrecision = "m"
    Microsecond TimePrecision = "u"

Package influxdb imports 10 packages (graph) and is imported by 2 packages. Updated 2016-07-16. Refresh now. Tools for package owners.