blob: 1ce40602d7ce3ce453a0f83af55149f811a2a0e6 [file] [log] [blame]
package ports
import "github.com/go-chassis/go-chassis/core/common"
var defaultProtocolPort = map[string]string{
common.ProtocolRest: "30101",
"grpc": "40101",
}
//SetFixedPort allows developer set a fixed port for for you protocol
func SetFixedPort(protocol, port string) {
defaultProtocolPort[protocol] = port
}
//GetFixedPort return port pf a protocol
func GetFixedPort(protocol string) string {
return defaultProtocolPort[protocol]
}