grpc-event-stream

module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT

README

gRPC Event stream

Event stream based Go microservice project using Nats JetStream, PostgresSQL & gRPC. Exhibit project to show case usage of cloud native ecosystem & tools.

Prerequisites

  • Golang 1.19+
  • Docker 20+ (compose extension)
  • Protoc compiler 3.8+

Running

  • Clone project & fetch go dependency

    go mod download
    
  • Compile event protocol buffer file & gen gRPC code

    make proto
    
  • Run the PSQL & Nats using docker

    docker compose pull
    docker compose up -d
    
  • Run DB migrations create tables.

    migrate -database ${POSTGRESQL_URL} -path migrations up
    
  • Run all the microservices in seprate shell

    go run cmd/order-svc/main.go
    go run cmd/payment-svc/main.go
    
  • Run sample client event flow

    go run cmd/client/main.go
    

Jump to

Keyboard shortcuts

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