diff --git a/domain/apiresponses/responses.go b/domain/apiresponses/responses.go index 9c22c661..0b8f8525 100644 --- a/domain/apiresponses/responses.go +++ b/domain/apiresponses/responses.go @@ -67,6 +67,7 @@ type BindingResponse struct { RouteServiceURL string `json:"route_service_url,omitempty"` VolumeMounts []domain.VolumeMount `json:"volume_mounts,omitempty"` BackupAgentURL string `json:"backup_agent_url,omitempty"` + Endpoints []domain.Endpoint `json:"endpoints,omitempty"` } type GetBindingResponse struct { diff --git a/domain/service_broker.go b/domain/service_broker.go index b19dde2f..0e0806c6 100644 --- a/domain/service_broker.go +++ b/domain/service_broker.go @@ -198,6 +198,7 @@ type Binding struct { RouteServiceURL string `json:"route_service_url"` BackupAgentURL string `json:"backup_agent_url,omitempty"` VolumeMounts []VolumeMount `json:"volume_mounts"` + Endpoints []Endpoint `json:"endpoints,omitempty"` } type GetBindingSpec struct { @@ -206,6 +207,13 @@ type GetBindingSpec struct { RouteServiceURL string VolumeMounts []VolumeMount Parameters any + Endpoints []Endpoint +} + +type Endpoint struct { + Host string `json:"host"` + Ports []string `json:"ports"` + Protocol string `json:"protocol,omitempty"` } func (d ProvisionDetails) GetRawContext() json.RawMessage { diff --git a/handlers/bind.go b/handlers/bind.go index 1047edcf..c7006ee4 100644 --- a/handlers/bind.go +++ b/handlers/bind.go @@ -88,6 +88,7 @@ func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) { RouteServiceURL: binding.RouteServiceURL, VolumeMounts: binding.VolumeMounts, BackupAgentURL: binding.BackupAgentURL, + Endpoints: binding.Endpoints, }) return } @@ -138,5 +139,6 @@ func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) { RouteServiceURL: binding.RouteServiceURL, VolumeMounts: binding.VolumeMounts, BackupAgentURL: binding.BackupAgentURL, + Endpoints: binding.Endpoints, }) } diff --git a/handlers/get_binding.go b/handlers/get_binding.go index cf55992c..d7edc008 100644 --- a/handlers/get_binding.go +++ b/handlers/get_binding.go @@ -59,6 +59,7 @@ func (h APIHandler) GetBinding(w http.ResponseWriter, req *http.Request) { SyslogDrainURL: binding.SyslogDrainURL, RouteServiceURL: binding.RouteServiceURL, VolumeMounts: binding.VolumeMounts, + Endpoints: binding.Endpoints, }, Parameters: binding.Parameters, })