From 63344684942f10f30564a3441a4a28579892b309 Mon Sep 17 00:00:00 2001 From: nhyatt Date: Mon, 1 Jul 2024 11:14:14 -0500 Subject: [PATCH] Adds endpoint to support get-binding response for OSB v2.16 --- domain/apiresponses/responses.go | 3 ++- domain/service_broker.go | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/domain/apiresponses/responses.go b/domain/apiresponses/responses.go index 9c22c661..7a788f30 100644 --- a/domain/apiresponses/responses.go +++ b/domain/apiresponses/responses.go @@ -71,7 +71,8 @@ type BindingResponse struct { type GetBindingResponse struct { BindingResponse - Parameters any `json:"parameters,omitempty"` + Parameters any `json:"parameters,omitempty"` + Endpoints []domain.Endpoint `json:"endpoints,omitempty"` } type UnbindResponse struct { diff --git a/domain/service_broker.go b/domain/service_broker.go index b19dde2f..80220769 100644 --- a/domain/service_broker.go +++ b/domain/service_broker.go @@ -206,6 +206,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 {