Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Name string `json:"name" validate:"required"`
Disabled bool `json:"disabled"`
Protocol string `json:"protocol" validate:"required_if=Enabled true,oneof=file http"`
Target string `json:"target" validate:"required_if=Enabled true"`
Options map[string]any `json:"options,omitempty"`
// contains filtered or unexported fields
}
type Events ¶
type Events struct {
Clients []*ClientConfig `json:"clients" validate:"dive"`
// contains filtered or unexported fields
}
type FileSender ¶
type FileSender struct {
// contains filtered or unexported fields
}
FileSender implements protocol.Sender to write CloudEvents to files.
func NewFileSender ¶
func NewFileSender(targetDir string) (*FileSender, error)
NewFileSender creates a new FileSender that writes events to the specified directory.
func (*FileSender) Send ¶
func (s *FileSender) Send(ctx context.Context, m binding.Message, transformers ...binding.Transformer) error
Send writes the CloudEvent to a file named after the event ID. If the file already exists, the event is appended to the file.
Click to show internal directories.
Click to hide internal directories.