Documentation ¶
Overview ¶
Package wh is the webhook manager writer. The goal of this package is to manage an input (webhook of any kind), send it to a parser, and write to an output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSourceNotSupported = errors.New("source not supported")
ErrSourceNotSupported is returned when the source is not supported.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector interface {
Write(ctx context.Context, payload []byte, headers map[string][]string) error
}
Connector holds all connector methods.
type MessageContainer ¶
type MessageContainer struct { Source string `json:"source"` Payload []byte `json:"payload"` Headers map[string][]string `json:"headers"` }
MessageContainer is a container for the message that will be sent to the publisher.
type PublisherConnector ¶
type PublisherConnector struct {
// contains filtered or unexported fields
}
PublisherConnector is a connector for the publisher.
func NewPublisherConnector ¶
func NewPublisherConnector(ctx context.Context, p publisher.Publisher, topicPrefix string) *PublisherConnector
NewPublisherConnector creates a new instance of PublisherConnector.
Click to show internal directories.
Click to hide internal directories.