-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integrated wit httpserver for integration
integrated with http server
- Loading branch information
1 parent
8a03f02
commit e273d4b
Showing
2 changed files
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
package main | ||
|
||
import ( | ||
"net" | ||
|
||
integrations "github.com/datasage-io/datasage/src/integrations" | ||
grpcServer "github.com/datasage-io/datasage/src/server" | ||
log "github.com/rs/zerolog/log" | ||
) | ||
|
||
func main() { | ||
|
||
//start integration component dependent servers | ||
go integrations.RunServer() | ||
//Run a gRPC Server for CLI command processing | ||
listen, err := net.Listen("tcp", ":"+grpcServer.PortNumber) | ||
if err != nil { | ||
log.Error().Msgf("gRPC server failed to listen : %v", err) | ||
} | ||
server := grpcServer.GetNewServer() | ||
//Start service | ||
log.Info().Msgf("gRPC server on %s port started", grpcServer.PortNumber) | ||
if err := server.Serve(listen); err != nil { | ||
log.Error().Msgf("Failed to serve: %v", err) | ||
} | ||
grpcServer.RunServer() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters