Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arwos/loopy
Service Discovery and KeyValue Storage
https://github.com/arwos/loopy
key-storage service-discovery
Last synced: 21 days ago
JSON representation
Service Discovery and KeyValue Storage
- Host: GitHub
- URL: https://github.com/arwos/loopy
- Owner: arwos
- License: bsd-3-clause
- Created: 2023-10-07T15:31:12.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-11T10:18:38.000Z (10 months ago)
- Last Synced: 2024-11-08T08:24:03.375Z (about 2 months ago)
- Topics: key-storage, service-discovery
- Language: Go
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Loopy
Loopy is designed to store and manage keys and values that are used by various services and applications. It provides a reliable system for tracking changes and updating text templates in real time.
## Install with go
```shell
go install go.arwos.org/loopy/...@latest
```## Server
Run server:
```shell
loppy --config=./config.yaml
```## Console client
### Work with template
```shell
loopycli --server=127.0.0.1:9500 template \
test_data/template.tmpl:test_data/template.out \
test_data/template2.tmpl:test_data/template2.out
```#### Template functions:
* __key__ - returns the key value or an empty string
```json
{{key "key/name"}}
```
* __key_or_default__ - returns the key value or default value
```json
{{key_or_default "key/name" "default value"}}
```
* __tree__ - returns a list of keys and value by prefix
```json
{{range $index, $data := tree "key/"}}
index: {{$index}} key: {{$data.Key}} val: {{$data.Value}}
{{end}}
```### Work with keys
* Set key
```shell
loopycli --server=127.0.0.1:9500 kv set "key/name" "key_value"
```
* Get key
```shell
loopycli --server=127.0.0.1:9500 kv get "key/name"
```
* Delete key
```shell
loopycli --server=127.0.0.1:9500 kv del "key/name"
```
* List key by prefix (with empty value)
```shell
loopycli --server=127.0.0.1:9500 kv list "key/"
```
* Search key by prefix (without empty value)
```shell
loopycli --server=127.0.0.1:9500 kv search "key/"
```