Documentation
¶
Overview ¶
Package cewrap implements event source proxies for knative agnostic services.
Index ¶
- Variables
- type Source
- type SourceOption
- func WithChangeMethods(m []string) SourceOption
- func WithDataschema(v string) SourceOption
- func WithDownstream(u string) SourceOption
- func WithHTTPClient(c *http.Client) SourceOption
- func WithLogger(l *slog.Logger) SourceOption
- func WithPathPrefix(v string) SourceOption
- func WithSink(s cloudevents.Client) SourceOption
- func WithSource(v string) SourceOption
- func WithTypePrefix(v string) SourceOption
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultChangeMethods = []string{ http.MethodPost, http.MethodDelete, http.MethodPatch, http.MethodPut, }
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewSource ¶
func NewSource(options ...SourceOption) *Source
func (*Source) Handler ¶
func (s *Source) Handler() http.HandlerFunc
Handler returns a HandlerFunc that handles the requests.
It passes the request to the downstream service and generates a cloud event and sends it to the sink.
type SourceOption ¶
type SourceOption interface {
// contains filtered or unexported methods
}
func WithChangeMethods ¶
func WithChangeMethods(m []string) SourceOption
func WithDataschema ¶
func WithDataschema(v string) SourceOption
func WithDownstream ¶
func WithDownstream(u string) SourceOption
func WithHTTPClient ¶
func WithHTTPClient(c *http.Client) SourceOption
func WithLogger ¶
func WithLogger(l *slog.Logger) SourceOption
func WithPathPrefix ¶
func WithPathPrefix(v string) SourceOption
func WithSink ¶
func WithSink(s cloudevents.Client) SourceOption
func WithSource ¶
func WithSource(v string) SourceOption
func WithTypePrefix ¶
func WithTypePrefix(v string) SourceOption
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
source
The source command implements a proxy server that emits cloud events when it successfully handled a method that changes the data in the downstream service.
|
The source command implements a proxy server that emits cloud events when it successfully handled a method that changes the data in the downstream service. |
Click to show internal directories.
Click to hide internal directories.