-
Notifications
You must be signed in to change notification settings - Fork 39
/
README.md.tpl
49 lines (33 loc) · 1.26 KB
/
README.md.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Redeo
[![Go Reference](https://pkg.go.dev/badge/github.com/bsm/redeo/v2)](https://pkg.go.dev/github.com/bsm/redeo/v2)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
The high-performance Swiss Army Knife for building redis-protocol compatible servers/services.
## Parts
This repository is organised into multiple components:
* [root](./) package contains the framework for building redis-protocol compatible,
high-performance servers.
* [resp](./resp/) implements low-level primitives for dealing with
RESP (REdis Serialization Protocol), client and server-side. It
contains basic wrappers for readers and writers to read/write requests and
responses.
* [client](./client/) contains a minimalist pooled client.
For full documentation and examples, please see the individual packages and the
official API documentation: https://godoc.org/github.com/bsm/redeo.
## Examples
A simple server example with two commands:
```go
package main
import (
"net"
"github.com/bsm/redeo/v2"
)
func main() {{ "ExampleServer" | code }}
```
More complex handlers:
```go
func main() {{ "ExampleHandlerFunc" | code }}
```
Redeo also supports command wrappers:
```go
func main() {{ "ExampleWrapperFunc" | code }}
```