🐛 Bug fixes on publishers and removal of dealer

This commit is contained in:
2024-10-31 22:48:51 +08:00
parent 001c9a8140
commit 1bd2da2850
11 changed files with 99 additions and 157 deletions

View File

@@ -9,14 +9,14 @@ import (
"net"
)
type Server struct {
type App struct {
proto.UnimplementedDirectoryServiceServer
srv *grpc.Server
}
func NewGrpc() *Server {
server := &Server{
func NewGrpc() *App {
server := &App{
srv: grpc.NewServer(),
}
@@ -28,7 +28,7 @@ func NewGrpc() *Server {
return server
}
func (v *Server) Listen() error {
func (v *App) Listen() error {
listener, err := net.Listen("tcp", viper.GetString("grpc_bind"))
if err != nil {
return err