# History Service
The history service is the gatekeeper for the InfluxDB database. It writes broadcasted data, and offers a REST interface for querying the database.
## Features
### QueryClient ([influx.py](./brewblox_history/influx.py))
Handles directly querying InfluxDB. API functions eventually call this.
### InfluxWriter ([influx.py](./brewblox_history/influx.py))
Periodically writes scheduled data points to InfluxDB.
Publicly offers the `write_soon()` function, where data can be scheduled for writing.
When connecting to InfluxDB, it will configure the database for automatic downsampling.
### DataRelay ([relays.py](./brewblox_history/relays.py))
Subscribes to the broadcast exchange on the event bus, and schedules all received data for writing to the database.
By default, it is subscribed to the broadcast exchange specified with the `--broadcast-exchange` commandline argument. Additional subscriptions can be added.
### LogRelay ([relays.py](./brewblox_history/relays.py))
Operates under the same principles as `DataRelay` (subscribe to events, write to database).
It is different in that it uses a different data protocol, and the log database is not downsampled.
## REST API
### subscribe ([influx.py](./brewblox_history/influx.py))
Adds another broadcast subscription. All data received with this subscription is written to InfluxDB.
### queries ([sse.py](./brewblox_history/sse.py))
Public query API for external clients. Input is sanitized before being passed on to InfluxDB.
### sse ([sse.py](./brewblox_history/sse.py))
Subscribe to regular updates of database values. The endpoint arguments are comparable to the ones used to get values from `queries`. It will periodically yield newly received data as SSE data.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共34个文件
py:14个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:brewblox-history-0.6.1.dev62.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
brewblox-history-0.6.1.dev62.tar.gz (34个子文件)
brewblox-history-0.6.1.dev62
MANIFEST.in 18B
.travis.yml 2KB
PKG-INFO 3KB
Pipfile 441B
test
test_queries.py 14KB
test_influx.py 5KB
conftest.py 1KB
__init__.py 0B
test_sse.py 3KB
test_relays.py 4KB
test_main.py 264B
brewblox_history.egg-info
PKG-INFO 3KB
requires.txt 102B
SOURCES.txt 664B
top_level.txt 17B
dependency_links.txt 1B
tox.ini 575B
LICENSE 34KB
Pipfile.lock 32KB
.env 236B
setup.cfg 38B
docker
amd
Dockerfile 230B
arm
Dockerfile 234B
.gitignore 14B
setup.py 970B
.gitignore 868B
README.md 2KB
.editorconfig 245B
brewblox_history
relays.py 8KB
sse.py 3KB
influx.py 8KB
__main__.py 2KB
__init__.py 0B
queries.py 12KB
共 34 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功