Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdouchement/hsync
HSync is a Proof of Concept of a shared lock across web services for very simple usecases
https://github.com/mdouchement/hsync
golang http services synchronization
Last synced: 14 days ago
JSON representation
HSync is a Proof of Concept of a shared lock across web services for very simple usecases
- Host: GitHub
- URL: https://github.com/mdouchement/hsync
- Owner: mdouchement
- License: mit
- Created: 2017-08-23T09:52:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T09:52:50.000Z (over 7 years ago)
- Last Synced: 2024-11-10T09:32:23.369Z (2 months ago)
- Topics: golang, http, services, synchronization
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HSync
HSync is a Proof of Concept of a shared lock across web services for very simple usecases.
HSync responds to HTTP requests to acquire and release a lock:
- Acquire a lock
```
POST /locks
{
"id": "my-lock"
}201 Created -> lock acquired
423 Locked -> lock not acquired
```- Release a lock
```
DELETE /locks/:id204 No Content -> lock released
404 Not Found -> lock already released
```- List all locks
```
GET /locks
```- Show a lock
```
GET /locks/:id
```## Installation
- Golang 1.8 (maybe older versions work too)
- `git clone` this repo
- `go get ./...` to get the dependencies
- `go run hsync.go lock.go` to run the server## License
**MIT**
## Contributing
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
5. Push to the branch (git push origin my-new-feature)
6. Create new Pull Request