Skip to content

Commit

Permalink
chore: add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
pancsta committed Jun 28, 2024
1 parent 6d7a029 commit e0b8426
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 16 deletions.
53 changes: 37 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# asyncmachine-go
<br>
<div align="center">
<a href="https://glasskube.dev?utm_source=github">
<img src="/assets/logo.png" alt="asyncmachine-go logo" height="160">
</a>

<h3 align="center">Declarative workflows with relations (state machine)</h3>

<p align="center">
<a href="#usage"><strong>Usage »</strong></a>
<br>
<a href="#examples"><strong>Examples »</strong></a>
<br>
<a href="#documentation"><strong>Documentation »</strong></a>
<br>
<a href="#tools"><strong>Tools »</strong></a>
<br>
<a href="#integrations"><strong>Integrations »</strong></a>
<br>
<a href="#case-studies"><strong>Case Studies »</strong></a>
<br>
</p>
</div>

<hr>

![TUI Debugger](assets/am-dbg.gif)

Expand All @@ -12,7 +36,7 @@ firewalls, telemetry, bots, etc.
> **asyncmachine-go** is a general purpose state machine for managing complex asynchronous workflows in a safe and
> structured way
## Comparison
### Comparison

Common differences from other state machines:

Expand All @@ -22,22 +46,27 @@ Common differences from other state machines:
- every transition can be rejected
- error is a state

### Buzzwords

> **AM technically is:** event emitter, queue, dependency graph, AOP, logical clocks, ~2.5k LoC, no deps
> **AM gives you:** states, events, thread-safety, logging, metrics, traces, debugger, history, flow constraints, scheduler
> **Flow constraints are:** state mutations, negotiation, relations, "when" methods, state contexts, external contexts
## Usage

### Basics

```go
// ProcessingFile -> FileProcessed (1 async and 1 sync state)
package main
import (
"context"
am "github.com/pancsta/asyncmachine-go/pkg/machine"
)

import am "github.com/pancsta/asyncmachine-go/pkg/machine"

func main() {
// init the machine
ctx := context.Background()
mach := am.New(ctx, am.Struct{
mach := am.New(nil, am.Struct{
"ProcessingFile": {
Add: am.S{"InProgress"},
Remove: am.S{"FileProcessed"},
Expand Down Expand Up @@ -129,14 +158,6 @@ func (h *Handlers) ProcessingFileState(e *am.Event) {

See [docs/cookbook.md](docs/cookbook.md) for more snippets.

## Buzzwords

> **AM technically is:** event emitter, queue, dependency graph, AOP, logical clocks, ~2.5k LoC, no deps
> **AM gives you:** states, events, thread-safety, logging, metrics, traces, debugger, history, flow constraints, scheduler
> **Flow constraints are:** state mutations, negotiation, relations, "when" methods, state contexts, external contexts
## Examples

### [FSM - Finite State Machine](/examples/fsm/fsm_test.go)
Expand Down
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions config/.mdl_style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
exclude_rule 'MD033'
# block quotes
exclude_rule 'MD028'
# first line H1
exclude_rule 'MD002'
# first line H1
exclude_rule 'MD041'
# ???
exclude_rule 'MD007'

0 comments on commit e0b8426

Please sign in to comment.