placeos-resource
Version, currently 3.1.337 versions
- 3.1.3latestMay 19, 2026
- 3.1.2not indexedMay 19, 2026
- 3.1.1not indexedMay 19, 2026
- 3.1.0not indexedMay 19, 2026
- 3.0.5not indexedMay 19, 2026
- 3.0.4not indexedMay 19, 2026
- 3.0.3not indexedMay 19, 2026
- 3.0.2not indexedMay 19, 2026
- 3.0.1not indexedMay 19, 2026
- 3.0.0not indexedMay 19, 2026
- 2.5.4not indexedMay 19, 2026
- 2.5.3not indexedMay 19, 2026
- 2.5.2not indexedMay 19, 2026
- 2.5.1not indexedMay 19, 2026
- 2.5.0not indexedMay 19, 2026
- 2.4.0not indexedMay 19, 2026
- 2.3.1not indexedMay 19, 2026
- 2.3.0not indexedMay 19, 2026
- 2.2.0not indexedMay 19, 2026
- 2.1.0not indexedMay 19, 2026
- 2.0.6not indexedMay 19, 2026
- 2.0.5not indexedMay 19, 2026
- 2.0.4not indexedMay 19, 2026
- 2.0.3not indexedMay 19, 2026
- 2.0.2not indexedMay 19, 2026
- 2.0.1not indexedMay 19, 2026
- 2.0.0not indexedMay 19, 2026
- 1.2.1not indexedMay 19, 2026
- 1.2.0not indexedMay 19, 2026
- 1.1.0not indexedMay 19, 2026
- 1.0.6not indexedMay 19, 2026
- 1.0.5not indexedMay 19, 2026
- 1.0.4not indexedMay 19, 2026
- 1.0.3not indexedMay 19, 2026
- 1.0.2not indexedMay 19, 2026
- 1.0.1not indexedMay 19, 2026
- 1.0.0not indexedMay 19, 2026
github.com/place-labs/resource
Abstraction over RethinkORM changefeeds
Installation
# Add this to your shard.yml
dependencies:
placeos-resource:
github: place-labs/resource
version: ~> 3.1.3Then run:
shards installshard.yml
- Crystal
>= 1.0.0
Dependencies
Runtime Dependencies
- pg-orm*github: spider-gazelle/pg-orm
- promise~> 3.0github: spider-gazelle/promise
- log_helper~> 1.0github: spider-gazelle/log_helper
- simple_retry*github: spider-gazelle/simple_retry
Development Dependencies
- ameba>= 0.14github: crystal-ameba/amebadev
- action-controller>= 4github: spider-gazelle/action-controllerdev
README
PlaceOS Resource
Abstraction over PgORM changefeeds
Implementation
PlaceOS::Resource(T) is a layer over PgORM models, providing an abstract interface to a table's changefeed.
abstract def process_resource(action : Action, resource : T)
process_resource(action : Action, resource : T) is the only abstract method one must implement.
On startup, the entire table is iterated asynchronously, yielding :created events for each model.
After the initial pass, Action::Created, Action::Deleted, and Action::Updated events on the table are processed as they are received.
Action::Updated
The model received with a :updated event has the changes applied in the form of standard active-model attribute changes information.
def on_reconnect
A non-abstract def. In its stock form, on_reconnect is a noop.
This method can be overwritten in inheriting classes to perform actions after a changefeed is recovered.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Caspian Baska - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
3.1.3- Tagged
- May 19, 2026
- Commit
575c1f1742b9- Crystal
>= 1.0.0- Indexed
- yes
Dependents
Repository
github.com/place-labs/resource
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 37