Skip to content

Commit

Permalink
First release (#20)
Browse files Browse the repository at this point in the history
* First release

* Update README
  • Loading branch information
jdextraze authored Mar 26, 2018
1 parent c6773f6 commit 0f27edf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 29 deletions.
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

A [Go](https://golang.org/) port of the .Net client for [Event Store](https://eventstore.org/).

## Status

This project is considered at an alpha stage and should'nt be used in production.

## Warning

API is still under development and could change.
## License

## Requirements
Ported code is released under the [MIT](https://github.com/jdextraze/go-gesclient/blob/master/LICENSE) license.

- Go 1.4+
Original code is released under the [Event Store License](https://github.com/EventStore/EventStore/blob/master/LICENSE.md).

## License
## Status

MIT. See [LICENSE](https://github.com/jdextraze/go-gesclient/blob/master/LICENSE).
This project is considered ready for production.

## Implemented
### Implemented

* Writing to a stream
* Reading a single event
Expand All @@ -35,21 +29,52 @@ MIT. See [LICENSE](https://github.com/jdextraze/go-gesclient/blob/master/LICENSE
* Set system settings
* Transaction

## TODO
### Missing

* Complete unit and integration tests
* Benchmarks
* Projections Management
* 64bit event number support

### Need Improvements

* Documentation
* Unit and integration tests
* Benchmarks

### Known issues

## External tools
* SSL connection are not working

## Getting started

### Requirements

- Go 1.4+

### Install

Install using `go get github.com/jdextraze/go-gesclient`.

### Optional Tools

* [Robo](https://github.com/tj/robo) (`go get github.com/tj/robo`)
* [Docker](https://www.docker.com/get-docker)
* [Dep](https://github.com/golang/dep)

### Running EventStore on local machine

See https://eventstore.org/docs/introduction/4.1.0/

### Running EventStore with docker

`docker run --rm --name eventstore -d -p 1113:1113 -p 2113:2113 eventstore/eventstore:release-4.1.0`

or if you installed robo

`robo start_es 4.1.0`

## Examples
### Examples

For examples, look into `examples`. You will need an instance of event store to be running to try it.
I suggest using [Docker](https://docker.com/) with [Event Store Docker Container](https://hub.docker.com/r/eventstore/eventstore/).
For examples, look into the `examples` folder.

## Other languages client

Expand Down
3 changes: 3 additions & 0 deletions messages/generate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package messages

//go:generate sh -c "protoc -I$GOPATH/src --go_out=$GOPATH/src $GOPATH/src/github.com/jdextraze/go-gesclient/messages/ClientMessageDtos.proto"
26 changes: 16 additions & 10 deletions robo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,30 @@ build:

start_es:
summary: Start eventstore
command: docker run --rm --name eventstore -d -p 1113:1113 -p 2113:2113 eventstore/eventstore:release-3.9.3
usage: "[version]"
examples:
- description: Start EventStore version 3.9.3
command: robo start_es 3.9.3
command: |
if [ "$1" == "" ]; then exit 2; fi
docker run --rm --name eventstore -d -p 1113:1113 -p 2113:2113 eventstore/eventstore:release-$1
stop_es:
summary: Stop eventstore
command: docker stop eventstore

start_es_cluster:
summary: Start eventstore cluster
usage: "[version]"
examples:
- description: Start a cluster of EventStore version 3.9.3
command: robo start_es_cluster 3.9.3
command: |
if [ "$1" == "" ]; then exit 2; fi
docker network create --attachable --subnet 172.30.0.0/24 esnet
docker run --rm --name eventstore1 --network esnet --network-alias escluster.net --ip 172.30.0.2 -d -p 2113:2113 -e EVENTSTORE_INT_IP=172.30.0.2 -e EVENTSTORE_EXT_IP=172.30.0.2 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-3.9.3
docker run --rm --name eventstore2 --network esnet --network-alias escluster.net --ip 172.30.0.3 -d -e EVENTSTORE_INT_IP=172.30.0.3 -e EVENTSTORE_EXT_IP=172.30.0.3 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-3.9.3
docker run --rm --name eventstore3 --network esnet --network-alias escluster.net --ip 172.30.0.4 -d -e EVENTSTORE_INT_IP=172.30.0.4 -e EVENTSTORE_EXT_IP=172.30.0.4 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-3.9.3
docker run --rm --name eventstore1 --network esnet --network-alias escluster.net --ip 172.30.0.2 -d -p 2113:2113 -e EVENTSTORE_INT_IP=172.30.0.2 -e EVENTSTORE_EXT_IP=172.30.0.2 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-$1
docker run --rm --name eventstore2 --network esnet --network-alias escluster.net --ip 172.30.0.3 -d -e EVENTSTORE_INT_IP=172.30.0.3 -e EVENTSTORE_EXT_IP=172.30.0.3 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-$1
docker run --rm --name eventstore3 --network esnet --network-alias escluster.net --ip 172.30.0.4 -d -e EVENTSTORE_INT_IP=172.30.0.4 -e EVENTSTORE_EXT_IP=172.30.0.4 -e EVENTSTORE_CLUSTER_SIZE=3 -e EVENTSTORE_CLUSTER_DNS=escluster.net -e EVENTSTORE_CLUSTER_GOSSIP_PORT=2112 eventstore/eventstore:release-$1
stop_es_cluster:
summary: Stop eventstore cluster
Expand All @@ -39,16 +50,11 @@ stop_cluster_test:
docker stop publisher catchup_subscriber
rm publisher catchup_subscriber
generate_protobuf:
summary: Generate protobuf
command: |
protoc -I$GOPATH/src --go_out=$GOPATH/src $GOPATH/src/github.com/jdextraze/go-gesclient/messages/ClientMessageDtos.proto
bct:
summary: Backward compatibility test
usage: "[go-version] [example]"
examples:
- description: Start EventStore. Run publisher with go 1.4. Stop EventStore.
command: robo start_es && robo bct 1.4 publisher && robo stop_es
command: robo start_es 3.9.3 && robo bct 1.4 publisher && robo stop_es
command: |
docker run --rm -v /$(PWD)/../../../://go/src --link eventstore golang:$1-alpine go run //go/src/github.com/jdextraze/go-gesclient/examples/$2/main.go -endpoint tcp://admin:changeit@eventstore:1113/ "$3"

0 comments on commit 0f27edf

Please sign in to comment.