This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Versioning rules: | |
| # - tagged commit -> <semver> -> 1.2.3 | |
| # - commit after tag -> <semver>.<commit-count-since-tag>-<shortsha> -> 1.2.3.133-f6101c9 | |
| # - no tags yet -> 0.0.0.<commit-count>-<shortsha> -> 0.0.0.133-f6101c9 | |
| VERSION ?= $(shell git describe --tags --always --long 2>/dev/null | sed -E 's/-0-g.*//;s/-(.*)-g/.\1-/;s/^[0-9a-f]+$$/0.0.0.'$(shell git rev-list --count HEAD)'-&/') | |
| version: ## Generates the current project version | |
| @echo $(VERSION) | |
| .PHONY: version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: ["*"] | |
| pull_request: | |
| jobs: | |
| version: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using KaffeineLabs.MQ.Outbox; | |
| using KaffeineLabs.Testcontainers.PostgreSql; | |
| using FluentAssertions; | |
| using Microsoft.EntityFrameworkCore; | |
| using Npgsql; | |
| using Xunit.Abstractions; | |
| namespace KaffeineLabs.MQ.Tests.Outbox; | |
| public class LearnPostgresListenNotifyTest(PostgreSqlFixture postgreSql, ITestOutputHelper testOutputHelper) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package payment.exposed | |
| import org.jetbrains.exposed.sql.* | |
| import org.jetbrains.exposed.sql.transactions.transaction | |
| import org.junit.jupiter.api.BeforeEach | |
| import org.testcontainers.containers.PostgreSQLContainer | |
| import org.testcontainers.junit.jupiter.Container | |
| import org.testcontainers.junit.jupiter.Testcontainers | |
| import org.testcontainers.utility.DockerImageName | |
| import payment.Payment |
Examples for the "Object-oriented event sourcing" article:
All gists:
-
Object-oriented event sourcing
These are code examples for the “Deriving state from events” article:
All gists:
-
Deriving state from events
These are code examples for the “Functional event sourcing example in Kotlin” article:
All gists:
-
Functional event sourcing example in Kotlin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.kaffeinelabs.function; | |
| import java.util.function.Supplier; | |
| public class Singleton<T> implements Supplier<T> { | |
| private final Supplier<? extends T> factory; | |
| private T instance = null; | |
| private Singleton(final Supplier<? extends T> factory) { | |
| this.factory = factory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.kaffeinelabs.debezium; | |
| import io.debezium.testing.testcontainers.DebeziumContainer; | |
| import org.testcontainers.containers.GenericContainer; | |
| import org.testcontainers.containers.KafkaContainer; | |
| import org.testcontainers.containers.Network; | |
| import org.testcontainers.containers.PostgreSQLContainer; | |
| import org.testcontainers.lifecycle.Startable; | |
| import org.testcontainers.utility.DockerImageName; |
NewerOlder