Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elcuervo/gost
Go version of Ost
https://github.com/elcuervo/gost
Last synced: 30 days ago
JSON representation
Go version of Ost
- Host: GitHub
- URL: https://github.com/elcuervo/gost
- Owner: elcuervo
- Created: 2014-02-17T00:14:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-12T20:52:58.000Z (over 10 years ago)
- Last Synced: 2023-04-10T15:48:26.136Z (over 1 year ago)
- Language: Go
- Size: 188 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gost
Gost is a Go port of [Ost](https://github.com/soveran/ost) for fun and profit.
If you want something **really** minimal you should take a look at
[Ostgo](https://github.com/soveran/ostgo)## Connect to a Redis server
```go
gost := gost.Connect(":6379")
```## Push ids to a queue
```go
gost.Push("my_jobs", "id_to_be_procesed")
```## View the items in that given queue
```go
gost.Items("my_jobs")
```## Stop all accesed queues
```go
gost.Stop()
```## Consume the elements in the queue
```go
gost.Each("my_jobs", func(id string) bool {
if(does_something_with_the_id(id)) {
// Everything is ok
return true
} else {
// If the fn returns false the items is kept in the backup key
return false
}
})
```