Skip to content

event: adding FeedOf[T] #24549

@fjl

Description

@fjl

Package event provides type Feed for subscription handling. A Feed is always constrained to a single type, and this restriction is enforced at runtime using reflection. With the introduction of generics in Go 1.18, it is now possible to declare and enforce the element type of Feed at compile time.

To avoid breaking downstream code, I suggest we add a new type FeedOf[T any] to package event. The behavior of this feed implementation would be exactly the same as the current one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions