Commit Graph

30 Commits

Author SHA1 Message Date
Alejandro Ruiz 10b40ce223 Add small help to the README 2024-09-10 09:00:46 +02:00
Alejandro Ruiz e9fb3665ee Switch to maintained gomock fork 2024-09-05 17:35:36 +02:00
Tom Lebreux f3b392ada2
Move to wrangler v3 (#427) 2024-05-02 10:06:30 -04:00
Alejandro Ruiz f5d32fe214
Allow GeneratingHandlers to skip Apply if resource version didn't change (#341)
* Allow GeneratingHandlers to skip Apply if resource version didn't change

* Run go generate

* Add call count to FakeApply

* Add test for UniqueApplyForResourceVersion

* Simplify error handling

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>

* Make generated code more readable

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>

* Rename constant

* Rename seenResourceVersion to storeResourceVersion

* go generate

* Add comments to code generator

* Run go generate

* Upgrade golangci-lint GitHub action, since it always fails now

---------

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>
2023-12-22 13:57:51 -05:00
Ricardo Weir d4a7d13cee Update module to v2 and update paths 2023-09-01 17:51:39 -07:00
Kevin Joiner 294dad04db Reduce generated clients/controllers.
The Generated Client, Controller, and Cache interfaces are now entirely
implemented by the generic Interfaces. These changes greatly reduce the
amount of generated code needed and allows users to use the mocks
directly with controllers without having to wrap them as an embedded
object.
2023-06-29 16:24:29 -04:00
Kevin Joiner 8110ecfc32 Update fakes to create valid mock controllers.
Generates the fakes package so that the mocks completely implement the
Controllers, Clients and Cache interfaces.
2023-06-29 16:24:29 -04:00
Kevin Joiner 423d848a8f Adds impersonation for clients.
This commit imports new lasso changes to allow users to create a new
client that impersonates requests for specified user.
2023-06-29 16:24:29 -04:00
Kevin Joiner 01ecd49211 Add test to Controller implemented Client methods. 2023-03-08 10:07:39 -05:00
Kevin Joiner fc1fea5cad Add fake package for creating generic mocks for controllers, Clients, and Caches.
To support easy mocking generic interfaces were added for controllers and caches.
And generated code now uses these interfaces instead of the generic structure.
This commit also adds code comments to the generated interfaces, and a README for the fake package.
2023-03-03 12:25:50 -05:00
Kevin Joiner 8a99fb5ad2 Refactor generated controllers and caches to call the generic functions.
Moved Controler and Cache implmentations from template strings in ype_go.go
to generic/controller.go and generic/cache.go. The generation
of type specific interface was left so that dependent packages do not
experince any breaking changes.
2023-03-03 12:15:32 -05:00
Kevin Joiner 707ef06124 Fix golangci-lint errors 2023-02-21 09:14:27 -05:00
Darren Shepherd 00e96268b4 Add healthcallback to generic FactoryOptions 2021-02-19 09:15:13 -07:00
Darren Shepherd 79560dec98 Allow wrangler to use a shared controller factory. 2020-05-15 08:57:51 -07:00
Darren Shepherd 464d24debe Lasso refactor 2020-04-15 22:19:21 -07:00
Darren Shepherd e56777d79d Don't aggregate errskip in handlers 2020-03-28 14:44:56 -07:00
Darren Shepherd 47235df3f6 Optimistically delete objs when owner is deleted 2020-03-28 14:44:56 -07:00
Darren Shepherd 2673c595f2 Real watch events should never be rate limited 2020-03-01 21:34:49 -07:00
Darren Shepherd 7dd0e2473b Add ability to add handlers transactionally 2020-02-06 21:37:42 -07:00
Darren Shepherd 4a25b66cf1 Drop updateOnChange 2019-10-14 10:16:37 -07:00
Darren Shepherd 2044a7b2bb Add status handler and generating handlers 2019-10-14 10:15:49 -07:00
Darren Shepherd 901068548f Don't require Kind/APIVersion to be set for object to passed to apply 2019-06-11 17:22:32 -07:00
Darren Shepherd 4202dbfa88 Create controller on Enqueue 2019-05-25 23:12:52 -07:00
Luther Monson 0c46053be2 removing klog, updating license 2019-05-17 11:55:29 -07:00
Daishan Peng f708acec84 multiple fixes 2019-04-19 09:16:57 -07:00
Luther Monson c04eb2bdce remove finalizer logic updates 2019-04-17 16:00:28 -07:00
Darren Shepherd a6b17de10a Move norman frameworks to wrangler 2019-03-28 11:47:54 -07:00
Darren Shepherd 74d7aaab2a Move signals 2019-03-19 16:31:33 -07:00
Darren Shepherd 22a25c82ff Make handlers removable 2019-03-19 10:40:01 -07:00
Darren Shepherd bf4c2244c0 Initial Commit 2019-03-18 23:41:27 -07:00