eventing

package
v0.0.0-...-feb181f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Eventing

Each CRUD operation generates cloudevents from the data layer. Events are sent using an EventManager and a Producer.

To send an event, the data layer first uses the requester's identity and information about the resource to look up a Producer from the EventManager. The Lookup handles any complicated logic about selecting the correct Kafka topic and captures the decision in the Producer. The data layer then uses the Producer to send the event.

This package contains two implementations.

  1. stdout dumps json encoded events to stdout
  2. kafka sends a cloudevent to a Kafka topic

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c CompletedConfig, source string, logger *log.Helper) (api.Manager, error)

Types

type CompletedConfig

type CompletedConfig struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Eventer string
	Kafka   *kafka.Config
}

func NewConfig

func NewConfig(o *Options) *Config

func (*Config) Complete

func (c *Config) Complete() (CompletedConfig, []error)

type Options

type Options struct {
	Kafka   *kafka.Options `mapstructure:"kafka"`
	Eventer string         `mapstructure:"eventer"`
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet, prefix string)

func (*Options) Complete

func (o *Options) Complete() []error

func (*Options) Validate

func (o *Options) Validate() []error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL