Integrates NATS as the core registry, broker, store, and transport provider for Go-Micro applications. Reuse when building microservices on NATS.
// Source: https://github.com/micro/go-micro | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. // Package natsprofile provides the NATS-backed plugin profile. // // It lives outside service/profile so that binaries which never select the // nats profile do not link the NATS registry, broker, store, transport, and // events machinery. Importing this package (directly, or via // go-micro.dev/v6/cmd/defaults) registers the profile under the name "nats". package natsprofile import ( "os" "strings" natslib "github.com/nats-io/nats.go" "go-micro.dev/v6/broker" "go-micro.dev/v6/broker/nats" nevents "go-micro.dev/v6/events/natsjs" "go-micro.dev/v6/registry" nreg "go-micro.dev/v6/r ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key