package nats
Import Path
/pkg/integrations/nats (on go.dev)
Dependency Relation
imports 5 packages, and imported by 0 packages
Involved Source Files
nats.go
Package-Level Functions (total 3)
Add is a helper to add a list of states to machine machID, exposed
under [topic]. It will block until the response or the context expires.
ExposeMachine exposes a state machine to NATS for requests of type
- GetterReq
- MutationReq
- WaitingReq
with responses of type
- GetterResp
- MutationResp
- WaitingResp
Each state machine subscribed to a dedicated subtopic "[topic].[machineID]".
Optional [queue] allows to load-balance requests across multiple subscribers.
ExposeMachine allocates a goroutine for GC blocked by ctx.
Remove is a helper to remove a list of states from machine machID,
exposed under [topic]. It will block until the response or the context
expires.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |