aves

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

AvES

GoVer GoDoc CircleCI Release Go Report Card Test Coverage Maintainability

Introduction

AvES is an that is tailored towards storing Events for Event Sourcing.

It uses the RESP (REdis Serialization Protocol) to communicate. This way it is possible to create clients by reusing the already available protocol. For example, it is possible to use the official Redis command line interface program to communicate with aves.

An event store is a datastore that stores events on disk indefinitely. An initial event sent for an aggregate stream creates the store of all events for that stream.

Features

  • Event publication
  • Event stream subscription
  • Event stream fetch over range
  • Redis based protocol

Building aves

git clone https://github.com/maarek/aves.git
cd aves
make build

Basic Event Store Usage

Once AvES is installed and available in your PATH, you can run it by executing the following command.

aves --out mydb.aves

There is now a aves server running on your machine and listening on 127.0.0.1:6480. In another terminal window, you can specify to a client to listen to only new events.

avcli "SUBSCRIBE" 'my-stream'

And in another one again you can send new events. All clients which are subscribed to that same stream will see the events.

avcli publish 'my-stream' '1' 'Hello World!'
avcli publish 'my-stream' '2' 'Hello America!'
avcli publish 'my-stream' '3' 'Hello Africa!'
avcli publish 'my-stream' '4' 'Hello Japan!'

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Command

type Command string

Command - a server command

const (
	// StreamDelete - redis delete command
	StreamDelete Command = "delete"
	// StreamExists - redis exists command
	StreamExists Command = "exists"
	// StreamList - redis list command
	StreamList Command = "slist"

	// EventList - redis event list command
	EventList Command = "elist"

	// EventPublish - redis event publish command
	EventPublish Command = "publish"
	// StreamSubscribe - redis stream subscription command
	StreamSubscribe Command = "subscribe"
	// SubscribeAll - redis all event subscription command
	SubscribeAll Command = "subscribeall"
)

Directories

Path Synopsis
cmd
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL