Categorygithub.com/jmalloc/ax
modulepackage
0.5.0
Repository: https://github.com/jmalloc/ax.git
Documentation: pkg.go.dev

# README

Ax

Build Status Code Coverage Latest Version GoDoc Go Report Card

Ax is a toolkit for writing distributed message-driven applications in Go. It has features specifically focused on CQRS and Event Sourcing.

go get -u github.com/jmalloc/ax/src/ax

This project is EXPERIMENTAL. Expect frequent breaking changes to the API.

# Packages

Package axcli generates Cobra CLI commands that send Ax messages.
Package axmysql provides MySQL-backed implementations of various interfaces consumed by Ax.
Package axrmq provides a RabbitMQ-based message transport.
Package axtest contains testing utilities and reusable test suites for implementations of various Ax components.
Package delayedmessage provides tools for delaying the sending of messages.
Package endpoint contains components that are composed to configure an 'endpoint', which can send and receive messages to other endpoints.
No description provided by the author
Package ident contains utilities for representing arbitrary identifiers.
Package marshaling provides utilities for marshaling and unmarshaling messages and other types.
Package messagestore contains interfaces used by Ax to read and write from persisted streams of messages.
Package observability provides tools for observing the behavior of an application, such as logging, metrics collection and tracing.
Package outbox provides an inbound pipeline stage that ensures message idempotence by employing the "outbox pattern".
Package persistence defines the interfaces Ax uses to persist data.
Package projection contains tools for projecting state from messages.
Package routing provides pipeline stages for routing messages to endpoints and within endpoints.
Package saga provides tools for building stateful message handlers.

# Functions

Delay is an option that delays sending the message until a duration has passed.
DelayUntil is an option that delays sending the message until a specific time.
GenerateMessageID generates a new unique identifier for a message.
MarshalEnvelope marshals env to a binary representation.
MarshalMessage marshals m to a binary representation.
MustParseMessageID parses s into a message ID and returns it.
NewEnvelope creates a new message envelope containing m.
NewEnvelopeFromProto returns a new envelope from its protocol-buffers representation.
NewMessageContext returns a message context for the given envelope.
NewMessageTypeSet returns a set containing the message types in mt.
ParseMessageID parses s into a message ID and returns it.
TypeByGoType returns the message type for the given Go type.
TypeByName returns the message type for a fully-qualified Protocol Buffers message name.
TypeOf returns the message type of m.
TypesByGoType returns a set containing the message types of the Go types in t.
TypesOf returns a set containing the message types of the messages in m.
UnmarshalEnvelope unmarshals an envelope from its serialized representation.
UnmarshalMessage unmarshals an Ax message from some serialized representation.

# Variables

No description provided by the author

# Structs

Envelope is a container for a message and its associated meta-data.
EnvelopeProto is a Protocol Buffers representation of an Envelope.
MessageContext provides context about the message being handled.
MessageID uniquely identifies a message.
MessageType provides information about a particular message type.
MessageTypeSet is a collection of unique message types.

# Interfaces

Command is a message that requests some action take place.
Event is a message that indicates some action has already taken place.
ExecuteOption is configures an envelope containing a command message to exhibit some specific behavior.
Message is a unit of communication.
PublishOption is configures an envelope containing an event message to exhibit some specific behavior.
Sender is an interface for sending messages.
SendOption is an option that can be used for both commands and events.

# Type aliases

CommandExecutor is a function that queues a command to be executed.
EventRecorder is a function that records the occurrence of events.