Svc REST: Rename service NewGenericREST to NewREST

Just like all the other registries.
This commit is contained in:
Tim Hockin 2021-02-28 22:00:01 -08:00
parent 03e7690cdb
commit 245a654dec
4 changed files with 5 additions and 5 deletions

View File

@ -261,7 +261,7 @@ func (c LegacyRESTStorageProvider) NewLegacyRESTStorage(restOptionsGetter generi
serviceIPAllocators[secondaryServiceClusterIPAllocator.IPFamily()] = secondaryServiceClusterIPAllocator
}
serviceRESTStorage, serviceStatusStorage, serviceRESTProxy, err := servicestore.NewGenericREST(
serviceRESTStorage, serviceStatusStorage, serviceRESTProxy, err := servicestore.NewREST(
restOptionsGetter,
serviceClusterIPAllocator.IPFamily(),
serviceIPAllocators,

View File

@ -96,7 +96,7 @@ func NewTestREST(t *testing.T, ipFamilies []api.IPFamily) (*GenericREST, *etcd3t
ResourcePrefix: "endpoints",
})
rest, _, _, err := NewGenericREST(restOptions, api.IPv4Protocol, ipAllocators, portAllocator, endpoints, nil, nil)
rest, _, _, err := NewREST(restOptions, api.IPv4Protocol, ipAllocators, portAllocator, endpoints, nil, nil)
if err != nil {
t.Fatalf("unexpected error from REST storage: %v", err)
}

View File

@ -78,8 +78,8 @@ var (
_ rest.Redirector = &GenericREST{}
)
// NewGenericREST returns a RESTStorage object that will work against services.
func NewGenericREST(
// NewREST returns a RESTStorage object that will work against services.
func NewREST(
optsGetter generic.RESTOptionsGetter,
serviceIPFamily api.IPFamily,
ipAllocs map[api.IPFamily]ipallocator.Interface,

View File

@ -154,7 +154,7 @@ func newStorageWithPods(t *testing.T, ipFamilies []api.IPFamily, pods []api.Pod,
}
}
serviceStorage, statusStorage, _, err := NewGenericREST(restOptions, ipFamilies[0], ipAllocs, portAlloc, endpointsStorage, podStorage.Pod, nil)
serviceStorage, statusStorage, _, err := NewREST(restOptions, ipFamilies[0], ipAllocs, portAlloc, endpointsStorage, podStorage.Pod, nil)
if err != nil {
t.Fatalf("unexpected error from REST storage: %v", err)
}