Example #1
0
func createThirdPartyObject(s storage.Interface, path, name string, obj interface{}) error {
	data, err := encodeToThirdParty(name, obj)
	if err != nil {
		return err
	}
	return s.Create(context.TODO(), etcdtest.AddPrefix(path), data, nil, 0)
}
Example #2
0
// CreateObj will create a single object using the storage interface
func CreateObj(helper storage.Interface, name string, obj, out runtime.Object, ttl uint64) error {
	return helper.Create(context.TODO(), name, obj, out, ttl)
}