Documentation
¶
Overview ¶
Package http implements an HTTP CloudEvents binding.
Index ¶
Constants ¶
View Source
const ContentType = "Content-Type"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
Message holds the Header and Body of a HTTP Request or Response.
func NewMessage ¶
NewMessage returns a Message with header and data from body. Reads and closes body.
func (*Message) Binary ¶ added in v0.11.0
func (m *Message) Binary(encoder binding.BinaryEncoder) error
func (*Message) Structured ¶
func (m *Message) Structured(encoder binding.StructuredEncoder) error
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver for CloudEvents as HTTP requests. Implements http.Handler, To receive messages, associate it with a http.Server.
type Sender ¶
type SenderOptionFunc ¶ added in v0.11.0
type SenderOptionFunc func(sender *Sender)
func ForceBinary ¶ added in v0.11.0
func ForceBinary() SenderOptionFunc
func ForceStructured ¶ added in v0.11.0
func ForceStructured() SenderOptionFunc
func WithTranscoder ¶ added in v0.11.0
func WithTranscoder(factory binding.TransformerFactory) SenderOptionFunc
Click to show internal directories.
Click to hide internal directories.