cent
Version, currently master branch1 version
- master branchlatestJun 6, 2019
github.com/dvirops/crystalcent
Centrifugo API library
3 stars
0 dependents
License: MIT
The last crawl could not reach this repository on its host: dvirops/crystalcent has moved: that owner and name no longer address a repository on GitHub. The entry stays because repositories come back, and because other shards still link to it.
Installation
# Add this to your shard.yml
dependencies:
cent:
github: dvirops/crystalcent
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.29.0- License
- MIT
- Author
- Josh Dvir
Dependencies
Runtime Dependencies
- halite0.10.0github: icyleaf/halite
Development Dependencies
- webmock*github: manastech/webmock.crdev
README
Crystalcent
crystalcent is a Centrifugo API wrapper writes with Crystal Language.
Inspired from gitlab.
Installation
- Add the dependency to your
shard.yml:
dependencies:
cent:
github: devops-israel/crystalcent
- Run
shards install
Usage
require "cent"
# configuration
endpoint = "https://cent.example.com" # No tailing forward slash
api_key = "<api_key>"
# initialize a new client with user and password for basic auth
centrifugo_client = Cent.client(endpoint, api_key)
# => #<Cent::Client:0x101653f20 @endpoint="https://cent.example.com", @api_key="xxx">
# server health
centrifugo_client.available?
# true
centrifugo_client.publish("channel_x", {text: "value1"})
centrifugo_client.broadcast(["channel_x", "channel_y"], {"stam" => "data"})
centrifugo_client.unsubscribe("channel_x", "user_x")
centrifugo_client.disconnect("user_x")
centrifugo_client.presence("channel_x")
centrifugo_client.presence_stats("channel_x")
centrifugo_client.history("channel_x")
centrifugo_client.channels
centrifugo_client.info
Implemented API
Completed
API
POST /api- Main API endpoint for all actions
Supported API calls:
- publish
- broadcast
- unsubscribe
- disconnect
- presence
- presence_stats
- history
- channels
- info
Server Health
GET /health- returns 200 OK (you need to configure Centrifugo to allow (health endpoint)[https://centrifugal.github.io/centrifugo/server/configuration/#healthcheck-endpoint])
Development
Prerequisites
Commands
- From inside the root of the project run
docker-compose up - The container is configured to run tests every time a file is changed so just start developing.
Contributing
- Fork it (https://github.com/devops-israel/crystalcent/fork)
- 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
- Josh Dvir - creator and maintainer
License
MIT License © devops-israel
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jun 6, 2019
- Crystal
0.29.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/dvirops/crystalcent
This repository could not be reached on its host the last time we looked.
Metadata
- Created
- Oct 3, 2026
- Updated
- Dec 2, 2026
- Synced
- Oct 19, 2026
- Versions
- 1