Exemplo n.º 1
0
// NewEtcdHelper creates a helper that works against objects that use the internal
// Kubernetes API objects.
func NewEtcdHelper(client EtcdGetSet, codec runtime.Codec, prefix string) EtcdHelper {
	return EtcdHelper{
		Client:     client,
		Codec:      codec,
		Versioner:  APIObjectVersioner{},
		PathPrefix: prefix,
		cache:      util.NewCache(maxEtcdCacheEntries),
	}
}
Exemplo n.º 2
0
func NewEtcdStorage(client tools.EtcdClient, codec runtime.Codec, prefix string) storage.Interface {
	return &etcdHelper{
		client:     client,
		codec:      codec,
		versioner:  APIObjectVersioner{},
		copier:     api.Scheme,
		pathPrefix: prefix,
		cache:      util.NewCache(maxEtcdCacheEntries),
	}
}