nats

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 10 Imported by: 0

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

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