Skip to content

Commit

Permalink
Sets a default public url
Browse files Browse the repository at this point in the history
  • Loading branch information
josejulio committed Sep 16, 2024
1 parent f39535e commit c394f88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ type Options struct {
func NewOptions() *Options {
id, _ := os.Hostname()
return &Options{
Id: id,
Name: "kessel-asset-inventory",
Id: id,
Name: "kessel-asset-inventory",
PublicUrl: "http://localhost:8081",

GrpcOptions: grpc.NewOptions(),
HttpOptions: http.NewOptions(),
Expand All @@ -36,7 +37,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet, prefix string) {

fs.StringVar(&o.Id, prefix+"id", o.Id, "id of the server")
fs.StringVar(&o.Name, prefix+"name", o.Name, "name of the server")
fs.StringVar(&o.PublicUrl, prefix+"public_url", o.Name, "Public url where the server is reachable")
fs.StringVar(&o.PublicUrl, prefix+"public_url", o.PublicUrl, "Public url where the server is reachable")

o.GrpcOptions.AddFlags(fs, prefix+"grpc")
o.HttpOptions.AddFlags(fs, prefix+"http")
Expand Down

0 comments on commit c394f88

Please sign in to comment.