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 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.