Skip to content

Commit

Permalink
fixed mapPort for abstractions
Browse files Browse the repository at this point in the history
  • Loading branch information
Akilan1999 committed Feb 10, 2024
1 parent 60c4bba commit c815ed3
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions abstractions/base.go
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
package abstractions

import (
"github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/Akilan1999/p2p-rendering-computation/config/generate"
"github.com/Akilan1999/p2p-rendering-computation/server"
"github.com/gin-gonic/gin"
"github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/Akilan1999/p2p-rendering-computation/config/generate"
"github.com/Akilan1999/p2p-rendering-computation/server"
"github.com/gin-gonic/gin"
)

// Init Initialises p2prc
func Init(customConfig interface{}) (config *config.Config, err error) {
// set the config file with default paths
config, err = generate.SetDefaults("P2PRC", false, customConfig, false)
if err != nil {
return
}
return
// set the config file with default paths
config, err = generate.SetDefaults("P2PRC", false, customConfig, false)
if err != nil {
return
}
return
}

// Start p2prc in a server mode
func Start() (*gin.Engine, error) {
engine, err := server.Server()
if err != nil {
return nil, err
}
return engine, nil
engine, err := server.Server()
if err != nil {
return nil, err
}
return engine, nil
}

func MapPort(port string) (mapPort string, err error) {
mapPort, err = server.MapPort(port)
return
func MapPort(port string) (entireAddres string, mapPort string, err error) {
entireAddres, mapPort, err = server.MapPort(port)
return
}

0 comments on commit c815ed3

Please sign in to comment.