Skip to content

Evaluate using generics for source/predicate/handler chain #2214

Closed
@alvaroaleman

Description

@alvaroaleman

Predicates currently take a client.Object and return a bool. With generics, we might be able to have typed generics, which would let ppl avoid a type assertion inside their predicate when they want to access anything other than metadata.

We currently type to client.Object, but this is both too much in the case of a source.Channel that could take literally everything that might not actually be a client.Object and too little in the case of everything else, as we lose the type information.

Metadata

Metadata

Assignees

Labels

lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions