InfluxEx.Bucket (influx_ex v0.3.1)
Data structure for a Bucket in InfluxDB
Link to this section Summary
Types
When data should expire in a bucket
The id of a bucket
Name of a bucket
Data retention rule for the bucket
The type of the bucket
Functions
Build a Bucket from a lose map returned from the InfluxDB API
Link to this section Types
Link to this type
expires_in()
@type expires_in() ::
:never
| {7 | 14 | 30 | 90, :days}
| {1 | 6 | 12 | 24 | 48 | 72, :hours}
| {1, :years}
When data should expire in a bucket
This is useful for creating bucket as a short hand to generate a retention_rule()
Link to this type
id()
@type id() :: binary()
The id of a bucket
Link to this type
links()
Link to this type
name()
@type name() :: binary()
Name of a bucket
Link to this type
retention_rule()
@type retention_rule() :: %{ every_seconds: integer(), shard_group_duration_seconds: integer(), type: :expire }
Data retention rule for the bucket
:every_seconds
- duration in seconds for how long data will be kept in the database.0
means infinite.:shared_group_duration_seconds
- shard duration measured in seconds:type
- is:expire
Link to this type
schema_type()
@type schema_type() :: :implicit | :explicit
@type t() :: %InfluxEx.Bucket{ created_at: DateTime.t() | nil, description: binary() | nil, id: id() | nil, labels: [map()], links: links() | nil, name: name(), org_id: binary(), retention_rules: [retention_rule()], rp: binary() | nil, schema_type: schema_type() | nil, type: type() | nil, updated_at: DateTime.t() | nil }
Link to this type
type()
@type type() :: :user | :system
The type of the bucket
:user
- a user created this bucket
:system
- a bucket that is crated and used by InfluxDB
Link to this section Functions
Link to this function
from_map(weak_map)
Build a Bucket from a lose map returned from the InfluxDB API