Prepare EtcdHelper to extract more data from Node
In order to support graceful deletion, the resource object will need access to the TTL value in etcd. Also, in the future we may want to get the creation index (distinct from modifiedindex) and expose it to clients. Change EtcdResourceVersioner to be more type specific (objects vs lists) and provide a default implementation that relies on the internal API convention. Also, rename etcd_tools.go to etcd_helper.go and split a few things up.
This commit is contained in:
@@ -37,7 +37,7 @@ var testTTL uint64 = 60
|
||||
func NewTestEventEtcdRegistry(t *testing.T) (*tools.FakeEtcdClient, generic.Registry) {
|
||||
f := tools.NewFakeEtcdClient(t)
|
||||
f.TestIndex = true
|
||||
h := tools.EtcdHelper{f, testapi.Codec(), tools.RuntimeVersionAdapter{testapi.MetadataAccessor()}}
|
||||
h := tools.NewEtcdHelper(f, testapi.Codec())
|
||||
return f, NewEtcdRegistry(h, testTTL)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user