nats

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nats provides the NATS event-bus Provider implementation. It emits typed IaC resource declarations for supported deploy targets.

Activated targets for the BMW pilot:

  • digitalocean.app_platform (TargetDigitalOceanApp) — fully implemented.

Stub targets (not yet activated, return ErrNotImplemented-style errors):

  • aws.ecs — deploy_aws_ecs.go
  • aws.eks — deploy_aws_eks.go
  • kubernetes — deploy_kubernetes.go

Package nats — providers.RuntimeBroker implementation backed by nats-go.

This file holds the NATS-specific publish/subscribe/ensure logic as a single Provider-shaped struct that satisfies the providers.RuntimeBroker contract. Step factories (steps/*.go) and the trigger module (trigger.go) dispatch through this RuntimeBroker via LookupRuntimeWithFallback + providers.RuntimeBroker so they never reach into nats-go directly.

URL resolution: ClusterConfig.dsn is the canonical connection string for every provider — Postgres DSN for pgchannel, NATS URL for nats. See the proto comment on ClusterConfig.dsn for the full per-provider semantics. The runtime layer therefore reads cfg.Dsn unconditionally as the broker URL; no provider-specific field switch is required.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() providers.Provider

New returns a fully-initialised NATS Provider.

func NewRuntime added in v0.2.0

func NewRuntime() providers.RuntimeBroker

NewRuntime returns a fresh providers.RuntimeBroker backed by nats-go. Each Connect call opens a new connection — runtimes themselves are stateless and safe to share across goroutines.

Types

This section is empty.

Jump to

Keyboard shortcuts

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