Add a generic proxier
To proxy traffic to anything that implements ResourceLocation. Currently, this is only services. This is easily extensible to minions (would supercede existing mechanism) and pods.
This commit is contained in:
@@ -73,8 +73,9 @@ type SimpleRESTStorage struct {
|
||||
requestedFieldSelector labels.Selector
|
||||
requestedResourceVersion uint64
|
||||
|
||||
// The location
|
||||
// The id requested, and location to return for ResourceLocation
|
||||
requestedResourceLocationID string
|
||||
resourceLocation string
|
||||
|
||||
// If non-nil, called inside the WorkFunc when answering update, delete, create.
|
||||
// obj receives the original input to the update, delete, or create call.
|
||||
@@ -153,7 +154,7 @@ func (storage *SimpleRESTStorage) ResourceLocation(id string) (string, error) {
|
||||
if err := storage.errors["resourceLocation"]; err != nil {
|
||||
return "", err
|
||||
}
|
||||
return id, nil
|
||||
return storage.resourceLocation, nil
|
||||
}
|
||||
|
||||
func extractBody(response *http.Response, object interface{}) (string, error) {
|
||||
|
Reference in New Issue
Block a user