Skip to content

Commit

Permalink
feat(proxy): reintroduce old args to maintain retrocompat
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Pragliola <[email protected]>
  • Loading branch information
Al-Pragliola committed Sep 24, 2024
1 parent fb837b7 commit 15e3ec2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ func init() {
proxyCmd.Flags().StringVarP(&cfg.Hostname, "hostname", "n", cfg.Hostname, "Proxy server listen hostname")
proxyCmd.Flags().IntVarP(&cfg.Port, "port", "p", cfg.Port, "Proxy server listen port")

proxyCmd.Flags().StringVar(&proxyCfg.DatastoreHostname, "mlmd-hostname", proxyCfg.DatastoreHostname, "MLMD hostname")
if err := proxyCmd.Flags().MarkDeprecated("mlmd-hostname", "please use --datastore-hostname instead"); err != nil {
glog.Errorf("error marking flag as deprecated: %v", err)
}

proxyCmd.Flags().IntVar(&proxyCfg.DatastorePort, "mlmd-port", proxyCfg.DatastorePort, "MLMD port")
if err := proxyCmd.Flags().MarkDeprecated("mlmd-port", "please use --datastore-port instead"); err != nil {
glog.Errorf("error marking flag as deprecated: %v", err)
}

proxyCmd.Flags().StringVar(&proxyCfg.DatastoreHostname, "datastore-hostname", proxyCfg.DatastoreHostname, "Datastore hostname")
proxyCmd.Flags().IntVar(&proxyCfg.DatastorePort, "datastore-port", proxyCfg.DatastorePort, "Datastore port")
proxyCmd.Flags().StringVar(&proxyCfg.DatastoreType, "datastore-type", proxyCfg.DatastoreType, "Datastore type")
Expand Down

0 comments on commit 15e3ec2

Please sign in to comment.