- delivery (artifact build)
It will append every incoming Google PubSub message to storage of your choice. Supported PDO drivers:
- postgres
mysql:
CREATE TABLE test_topic_table (
message_id VARCHAR(16) UNIQUE NOT NULL,
publish_time TIMESTAMP NOT NULL,
body TEXT NOT NULL
);
postgresql:
CREATE TABLE test_topic_table (
message_id char(16) CONSTRAINT test_topic_table_pk PRIMARY KEY,
publish_time timestamp,
body TEXT
);
On the input, Cloud Function will get a Psr\Http\Message\ServerRequestInterface
.
If these ENV vars are set (and configured in terraform module definition), all messages, published to the main topic will be persisted to according storage:
- DB_NAME
- DB_USER
- DB_PASSWORD
- CONNECTION_NAME
- TOPIC - (name of DB table, where all topic messages will be persisted for good)
TODO
See /.gitlab-ci.yml
+ infrastructure
folder.
- explain artifact delivery
- build some widely available artifact
- other storages support (when needed)
- refactor logger
To increase amount of logs - send env variable
DEBUG=true
Examples of Cloud Function usages can be found in the /infrastructure/my-dev-env/main.tf
file:
- recorder
- list records from topic table
- prune (for development needs only!)