Peter Kurfer
1ef1f59402
- add config struct for API - add UUID to endpoint to be able to address them uniquely - add manager to handle all gRPC services
15 lines
216 B
Go
15 lines
216 B
Go
package config
|
|
|
|
import "net/url"
|
|
|
|
type RPC struct {
|
|
Listen string
|
|
}
|
|
|
|
func (r RPC) ListenURL() (u *url.URL) {
|
|
var err error
|
|
if u, err = url.Parse(r.Listen); err != nil {
|
|
u, _ = url.Parse("tcp://:0")
|
|
}
|
|
return
|
|
}
|