Open
Description
Currently we use the raw cloudevents client directly. This can pose many problems in the future
- Breaking changes
- Complex flows
So instead we should wrap the client which mitigates the two problems listed above, and allows us to add custom patterns ourselves, e.g. hooks. Users should be able to provide their own client if they want, but we should always wrap the client for any SDK.
cc, err := cdevents.NewCDEventsClient(cdevents.WithPresendHook(func(client cdevents.Client) {
log.Println("Some fancy logging")
})
// and allowing users to pass in their own client
cc, err := cdevents.NewCDEventsClient(cdevents.CDEventsClientOptions.WithCloudEventsClient(cloudeventsClient))
Metadata
Metadata
Assignees
Labels
No labels