microsplit

command
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Command microsplit is the runnable demo for the deployable-modules preview. The same binary boots as a monolith (no env vars set) or as a single split unit when NEXUS_DEPLOYMENT is set:

# monolith — both modules in one process
go run .
curl -X POST localhost:8080/checkout -d '{"userId":"u1","orderId":"o7"}' \
     -H 'content-type: application/json'

# split — users on :8081, checkout on :8080 talking to it
NEXUS_DEPLOYMENT=users-svc PORT=8081 go run . &
NEXUS_DEPLOYMENT=checkout USERS_SVC_URL=http://localhost:8081 PORT=8080 go run .

(For the v0.9 preview we don't filter out remote modules from the graph yet — both modules are wired in either binary, but the generated UsersClient picks the right transport based on the binary's deployment.)

Directories

Path Synopsis
Package checkout demonstrates a module that *consumes* another module via its generated typed client.
Package checkout demonstrates a module that *consumes* another module via its generated typed client.
Package users is the canonical "owns its data, exposes typed REST" module: a minimal user catalog tagged DeployAs("users-svc") so it can be peeled out into its own binary later.
Package users is the canonical "owns its data, exposes typed REST" module: a minimal user catalog tagged DeployAs("users-svc") so it can be peeled out into its own binary later.

Jump to

Keyboard shortcuts

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