@@ -118,21 +118,24 @@ def version():
118118 "-h" ,
119119 type = click .STRING ,
120120 default = "0.0.0.0" ,
121- help = "Specify a host for the server [default: 0.0.0.0]" ,
121+ show_default = True ,
122+ help = "Specify a host for the server" ,
122123)
123124@click .option (
124125 "--port" ,
125126 "-p" ,
126127 type = click .INT ,
127128 default = 8888 ,
128- help = "Specify a port for the server [default: 8888]" ,
129+ show_default = True ,
130+ help = "Specify a port for the server" ,
129131)
130132@click .option (
131133 "--registry_ttl_sec" ,
132134 "-r" ,
133- help = "Number of seconds after which the registry is refreshed. Default is 5 seconds. " ,
135+ help = "Number of seconds after which the registry is refreshed" ,
134136 type = int ,
135137 default = 5 ,
138+ show_default = True ,
136139)
137140@click .pass_context
138141def ui (ctx : click .Context , host : str , port : int , registry_ttl_sec : int ):
@@ -610,31 +613,42 @@ def init_command(project_directory, minimal: bool, template: str):
610613 "-h" ,
611614 type = click .STRING ,
612615 default = "127.0.0.1" ,
613- help = "Specify a host for the server [default: 127.0.0.1]" ,
616+ show_default = True ,
617+ help = "Specify a host for the server" ,
614618)
615619@click .option (
616620 "--port" ,
617621 "-p" ,
618622 type = click .INT ,
619623 default = 6566 ,
620- help = "Specify a port for the server [default: 6566]" ,
624+ show_default = True ,
625+ help = "Specify a port for the server" ,
621626)
622627@click .option (
623628 "--type" ,
624629 "-t" ,
625630 "type_" ,
626631 type = click .STRING ,
627632 default = "http" ,
628- help = "Specify a server type: 'http' or 'grpc' [default: http]" ,
633+ show_default = True ,
634+ help = "Specify a server type: 'http' or 'grpc'" ,
635+ )
636+ @click .option (
637+ "--go" ,
638+ is_flag = True ,
639+ show_default = True ,
640+ help = "Use Go to serve" ,
629641)
630642@click .option (
631643 "--no-access-log" ,
632644 is_flag = True ,
633- help = "Disable the Uvicorn access log." ,
645+ show_default = True ,
646+ help = "Disable the Uvicorn access log" ,
634647)
635648@click .option (
636649 "--no-feature-log" ,
637650 is_flag = True ,
651+ show_default = True ,
638652 help = "Disable logging served features" ,
639653)
640654@click .pass_context
@@ -643,6 +657,7 @@ def serve_command(
643657 host : str ,
644658 port : int ,
645659 type_ : str ,
660+ go : bool ,
646661 no_access_log : bool ,
647662 no_feature_log : bool ,
648663):
@@ -651,6 +666,10 @@ def serve_command(
651666 cli_check_repo (repo )
652667 store = FeatureStore (repo_path = str (repo ))
653668
669+ if go :
670+ # Turn on Go feature retrieval.
671+ store .config .go_feature_retrieval = True
672+
654673 store .serve (host , port , type_ , no_access_log , no_feature_log )
655674
656675
0 commit comments