Documentation ¶
Overview ¶
Package fanout provides an http.Handler that takes in one request and fans it out to N other requests, based on a list of Subscriptions. Logically, it represents all the Subscriptions to a single Knative Channel. It will normally be used in conjunction with multichannelfanout.MessageHandler, which contains multiple fanout.MessageHandler, each corresponding to a single Knative Channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Subscriptions []Subscription `json:"subscriptions"` // AsyncHandler controls whether the Subscriptions are called synchronous or asynchronously. // It is expected to be false when used as a sidecar. AsyncHandler bool `json:"asyncHandler,omitempty"` }
Config for a fanout.MessageHandler.
type MessageHandler ¶ added in v0.14.0
type MessageHandler struct {
// contains filtered or unexported fields
}
MessageHandler is a http.Handler that takes a single request in and fans it out to N other servers.
func NewMessageHandler ¶ added in v0.14.0
func NewMessageHandler(logger *zap.Logger, messageDispatcher channel.MessageDispatcher, config Config) (*MessageHandler, error)
NewMessageHandler creates a new fanout.MessageHandler.
func (*MessageHandler) ServeHTTP ¶ added in v0.14.0
func (f *MessageHandler) ServeHTTP(response nethttp.ResponseWriter, request *nethttp.Request)
type Subscription ¶ added in v0.17.0
type Subscription struct { Subscriber *url.URL Reply *url.URL DeadLetter *url.URL RetryConfig *kncloudevents.RetryConfig }
func SubscriberSpecToFanoutConfig ¶ added in v0.17.0
func SubscriberSpecToFanoutConfig(sub eventingduckv1.SubscriberSpec) (*Subscription, error)
Click to show internal directories.
Click to hide internal directories.