go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/ui/guides/add_new_prpc_service.md (about)

     1  # Adding a new PRPC service to LUCI UI
     2  
     3  ## Add a new host
     4  
     5  If LUCI UI is not currently using any services on the host of the new service, you need to [add a new host](add_new_host.md) to LUCI UI before adding the new service.
     6  
     7  ## Generate proto bindings
     8  
     9  LUCI UI uses generated proto bindings for calling PRPC services.
    10  
    11  To tell LUCI UI to about the new service, add the proto file with your service definition to the end of `luci/milo/ui/scripts/gen_proto.sh`.
    12  
    13  Once this is complete, you can regenerate the LUCI UI proto bindings with `npm run gen_proto` in the `ui` directory.
    14  
    15  You will need to regenerate the proto bindings any time your UI code needs to use an updated version of the service proto.
    16  
    17  You can find the generated proto files in `ui/src/proto`.