Documentation ¶
Index ¶
- Constants
- type Client
- func (self *Client) AlterDatabasePrivilege(database, name string, isAdmin bool, permissions ...string) error
- func (self *Client) AuthenticateClusterAdmin(username, password string) error
- func (self *Client) AuthenticateDatabaseUser(database, username, password string) error
- func (self *Client) ChangeClusterAdminPassword(name, newPassword string) error
- func (self *Client) ChangeDatabaseUser(database, name, newPassword string, isAdmin bool, newPermissions ...string) error
- func (self *Client) CreateClusterAdmin(name, password string) error
- func (self *Client) CreateDatabase(name string) error
- func (self *Client) CreateDatabaseUser(database, name, password string, permissions ...string) error
- func (self *Client) CreateShardSpace(space *cluster.ShardSpace) error
- func (self *Client) DeleteClusterAdmin(name string) error
- func (self *Client) DeleteContinuousQueries(id int) error
- func (self *Client) DeleteDatabase(name string) error
- func (self *Client) DeleteDatabaseUser(database, name string) error
- func (self *Client) DisableCompression()
- func (self *Client) DropShard(id uint32, serverIds []uint32) error
- func (self *Client) DropShardSpace(database, name string) error
- func (self *Client) GetClusterAdminList() ([]map[string]interface{}, error)
- func (self *Client) GetContinuousQueries() ([]map[string]interface{}, error)
- func (self *Client) GetDatabaseList() ([]map[string]interface{}, error)
- func (self *Client) GetDatabaseUserList(database string) ([]map[string]interface{}, error)
- func (self *Client) GetShardSpaces() ([]*cluster.ShardSpace, error)
- func (self *Client) GetShards() (*LongTermShortTermShards, error)
- func (self *Client) Ping() error
- func (self *Client) Query(query string, precision ...TimePrecision) ([]*Series, error)
- func (self *Client) QueryWithNumbers(query string, precision ...TimePrecision) ([]*Series, error)
- func (self *Client) RemoveServer(id int) error
- func (self *Client) Servers() ([]map[string]interface{}, error)
- func (self *Client) UpdateClusterAdmin(name, password string) error
- func (self *Client) UpdateDatabaseUser(database, name, password string) error
- func (self *Client) UpdateDatabaseUserPermissions(database, name, readPermission, writePermissions string) error
- func (self *Client) WriteSeries(series []*Series) error
- func (self *Client) WriteSeriesOverUDP(series []*Series) error
- func (self *Client) WriteSeriesWithTimePrecision(series []*Series, timePrecision TimePrecision) error
- type ClientConfig
- type LongTermShortTermShards
- type Series
- type Shard
- type ShardSpaceCollection
- type TimePrecision
Constants ¶
View Source
const (
UDPMaxMessageSize = 2048
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
func (*Client) AlterDatabasePrivilege ¶
func (*Client) AuthenticateClusterAdmin ¶
func (*Client) AuthenticateDatabaseUser ¶
func (*Client) ChangeClusterAdminPassword ¶
Change the cluster admin password
func (*Client) ChangeDatabaseUser ¶
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 ¶
func (*Client) CreateDatabase ¶
func (*Client) CreateDatabaseUser ¶
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 ¶
func (self *Client) CreateShardSpace(space *cluster.ShardSpace) error
Added to InfluxDB in 0.8.0
func (*Client) DeleteClusterAdmin ¶
func (*Client) DeleteContinuousQueries ¶
func (*Client) DeleteDatabase ¶
func (*Client) DeleteDatabaseUser ¶
func (*Client) DisableCompression ¶
func (self *Client) DisableCompression()
func (*Client) DropShardSpace ¶
Added to InfluxDB in 0.8.0
func (*Client) GetClusterAdminList ¶
func (*Client) GetContinuousQueries ¶
func (*Client) GetDatabaseList ¶
func (*Client) GetDatabaseUserList ¶
func (*Client) GetShardSpaces ¶
func (self *Client) GetShardSpaces() ([]*cluster.ShardSpace, error)
Added to InfluxDB in 0.8.0
func (*Client) GetShards ¶
func (self *Client) GetShards() (*LongTermShortTermShards, error)
func (*Client) Query ¶
func (self *Client) Query(query string, precision ...TimePrecision) ([]*Series, error)
func (*Client) QueryWithNumbers ¶
func (self *Client) QueryWithNumbers(query string, precision ...TimePrecision) ([]*Series, error)
func (*Client) RemoveServer ¶
func (*Client) UpdateClusterAdmin ¶
func (*Client) UpdateDatabaseUser ¶
func (*Client) UpdateDatabaseUserPermissions ¶
func (*Client) WriteSeries ¶
func (*Client) WriteSeriesOverUDP ¶
func (*Client) WriteSeriesWithTimePrecision ¶
func (self *Client) WriteSeriesWithTimePrecision(series []*Series, timePrecision TimePrecision) error
type ClientConfig ¶
type LongTermShortTermShards ¶
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 ¶
type Series struct { Name string `json:"name"` Columns []string `json:"columns"` Points [][]interface{} `json:"points"` }
func (*Series) GetColumns ¶
type ShardSpaceCollection ¶
type ShardSpaceCollection struct {
ShardSpaces []cluster.ShardSpace
}
type TimePrecision ¶
type TimePrecision string
const ( Second TimePrecision = "s" Millisecond TimePrecision = "m" Microsecond TimePrecision = "u" )
Click to show internal directories.
Click to hide internal directories.