@@ -105,7 +105,7 @@ type EndpointDiscovery interface {
105105type DiscoveryNotifier interface {
106106 // Upsert adds or updates an endpoint in the datastore.
107107 Upsert (endpoint *EndpointMetadata)
108- // Delete removes an endpoint by its namespaced name .
108+ // Delete removes an endpoint by its ID .
109109 Delete (id types.NamespacedName )
110110}
111111```
@@ -114,8 +114,8 @@ type DiscoveryNotifier interface {
114114
115115| Field | Type | Description |
116116| ---| ---| ---|
117- | ` NamespacedName ` | ` types.NamespacedName ` | Unique identity of the endpoint. |
118- | ` PodName ` | ` string ` | Logical name (used in metrics) . |
117+ | ` ID ` | ` types.NamespacedName ` | Unique identity of the endpoint. Each discovery source must set it uniquely across the endpoints it reports . |
118+ | ` Name ` | ` string ` | Name of the workload behind the endpoint . |
119119| ` Address ` | ` string ` | IP address of the inference server. |
120120| ` Port ` | ` string ` | Port as a string (e.g. ` "8000" ` ). |
121121| ` MetricsHost ` | ` string ` | ` host:port ` for metrics scraping. Defaults to ` address:port ` if empty. |
@@ -555,9 +555,9 @@ func (d *MyDiscovery) TypedName() fwkplugin.TypedName { return d.typedName }
555555func (d *MyDiscovery ) Start (ctx context .Context , notifier fwkdl .DiscoveryNotifier ) error {
556556 // 1. Enumerate existing endpoints.
557557 notifier.Upsert (&fwkdl.EndpointMetadata {
558- NamespacedName: types.NamespacedName {Name: " ep0" , Namespace: " default" },
559- Address: " 10.0.0.1" ,
560- Port: " 8000" ,
558+ ID: types.NamespacedName {Name: " ep0" , Namespace: " default" },
559+ Address: " 10.0.0.1" ,
560+ Port: " 8000" ,
561561 MetricsHost: " 10.0.0.1:8000" ,
562562 })
563563
0 commit comments