Skip to content

Commit

Permalink
Add ci server
Browse files Browse the repository at this point in the history
  • Loading branch information
namreg committed Oct 24, 2018
1 parent 4dab88b commit 87ea89f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
build
coverage.txt
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: go

go:
- 1.x

script:
- make test

before_install:
- go get github.com/gojuno/minimock/cmd/minimock
- go get github.com/golang/dep/cmd/dep

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ lint:
.PHONY: test
test: vendor generate
@echo "======> running tests"
@go test -race $(PKGS) -cover
@go test -cover -race -coverprofile=coverage.txt -covermode=atomic $(PKGS)

.PHONY: clear
clear:
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Godown

[![Build Status](https://www.travis-ci.org/namreg/godown.svg?branch=master)](https://www.travis-ci.org/namreg/godown)
[![Go Report Card](https://goreportcard.com/badge/github.com/namreg/godown)](https://goreportcard.com/report/github.com/namreg/godown)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/namreg/godown/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/namreg/godown/branch/master/graph/badge.svg)](https://codecov.io/gh/namreg/godown)

A simple, distributed, fault-tolerant key-value storage inspired by Redis. It uses [Raft](https://raft.github.io) protocotol as consensus algorithm.
It supports the following data structures: `String`, `Bitmap`, `Map`, `List`.
Expand All @@ -10,7 +13,7 @@ It supports the following data structures: `String`, `Bitmap`, `Map`, `List`.
### How to install

#### Install via binaries
You can find binaries on the [Github releases page](https://github.com/namreg/godown/releases).
You can find binaries on the [Github releases page](https://github.com/namreg/godown/client/releases).

#### Install via docker
```bash
Expand Down Expand Up @@ -131,4 +134,8 @@ func main() {
}
}
```
Client documentation available at [godoc](https://godoc.org/github.com/namreg/godown)
Client documentation available at [godoc](https://godoc.org/github.com/namreg/godown/client)

### TODO
- [ ] Write more docs
- [ ] Write more tests
6 changes: 3 additions & 3 deletions internal/storage/marshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (v *Value) UnmarshalJSON(j []byte) error {
case StringDataType:
s, ok := mv.(string)
if !ok {
return fmt.Errorf("could not unmarshal string value: not a string representaion")
return fmt.Errorf("could not unmarshal string value: not a string representation")
}
val.data = s
case ListDataType:
Expand All @@ -58,7 +58,7 @@ func (v *Value) UnmarshalJSON(j []byte) error {
case MapDataType:
tm, ok := mv.(map[string]interface{})
if !ok {
return fmt.Errorf("could not unmarshal map value: not a map representaion")
return fmt.Errorf("could not unmarshal map value: not a map representation")
}
vmap := make(map[string]string, len(tm))
for mkey, mvalue := range tm {
Expand All @@ -72,7 +72,7 @@ func (v *Value) UnmarshalJSON(j []byte) error {
case BitMapDataType:
l, ok := mv.([]uint64)
if !ok {
return fmt.Errorf("could not unmarshal bitmap value: not a bitmap representaion")
return fmt.Errorf("could not unmarshal bitmap value: not a bitmap representation")
}
val.data = l
}
Expand Down

0 comments on commit 87ea89f

Please sign in to comment.