Added notificaiton model
This commit is contained in:
7
main.go
7
main.go
@@ -11,7 +11,6 @@ import (
|
||||
"gitlab.com/pactual1/backend/services/blockchain"
|
||||
"gitlab.com/pactual1/backend/services/contract"
|
||||
"gitlab.com/pactual1/backend/services/erp"
|
||||
"gitlab.com/pactual1/backend/services/messaging"
|
||||
"gitlab.com/pactual1/backend/shared"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -63,12 +62,12 @@ func main() {
|
||||
}()
|
||||
|
||||
// Initialize channels
|
||||
messagingChannel := make(chan string)
|
||||
// messagingChannel := make(chan string)
|
||||
erpChannel := make(chan string)
|
||||
contractChannel := make(chan string)
|
||||
|
||||
// Start services and pass the respective channels
|
||||
go messaging.MessagingService(messagingChannel)
|
||||
// go messaging.MessagingService(messagingChannel)
|
||||
go erp.ERPService(erpChannel)
|
||||
|
||||
encryptionClient := shared.NewEncryptionClient(config.AppConfig.Service.BlockchainSecret)
|
||||
@@ -77,7 +76,7 @@ func main() {
|
||||
go contractService.ContractService()
|
||||
|
||||
// Sending messages via channels
|
||||
messagingChannel <- "Send an email"
|
||||
// messagingChannel <- "Send an email"
|
||||
erpChannel <- "Update ERP record"
|
||||
contractChannel <- "Update contract info"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user