[GET] - get all transactions from DB
curl --location --request GET 'http://localhost:8080/transactions'
[GET] - get transaction by ID from DB
curl --location --request GET 'http://localhost:8080/transaction/63473674-95dc-4d81-9e88-41eb932b863f'
[GET] - get all transactions from cache
curl --location --request GET 'http://localhost:8080/transactions-cache'
[GET] - get transaction by ID from from cache
curl --location --request GET 'http://localhost:8080/transaction-cache/99e16d0d-2bbd-4c6c-8667-1e0e1b7db52f'
> go mod init github.com/truecoder34/l0-wb-nats-service
> go get github.com/nats-io/nats-streaming-server
> go get github.com/nats-io/go-nats-streaming
> go get gorm.io/gorm
> go get github.com/satori/go.uuid
> go get github.com/joho/godotenv
> go get "gorm.io/driver/postgres"
> go get "github.com/gorilla/mux"
> go get "github.com/gin-gonic/gin"
> go get "github.com/gorilla/mux"
NATS Straming vased on NATS (gnatsd) and provides an extra capability of having a persist logs to be used for event streaming systems. https://github.com/nats-io/stan.go/blob/main/examples/
-
Run Server
go run nats-streaming-server.go
-
Run Sender
go run nats-streaming-server.go
-
Run Consumer
go run nats-streaming-server.go