event

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvroProducer

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

AvroProducer of output events.

func NewAvroProducer

func NewAvroProducer(outputChannel chan []byte, marshaller Marshaller) *AvroProducer

NewAvroProducer returns a new instance of AvroProducer.

func (*AvroProducer) ImagePublished

func (producer *AvroProducer) ImagePublished(event *ImagePublished) error

ImagePublished produces a new ImagePublished event.

func (*AvroProducer) ImageUploaded

func (producer *AvroProducer) ImageUploaded(event *ImageUploaded) error

ImageUploaded produces a new ImageUploaded event.

type ImagePublished

type ImagePublished struct {
	ImageID string `avro:"image_id"`
}

ImagePublished provides an avro structure for an image published event

type ImageUploaded

type ImageUploaded struct {
	Path    string `avro:"path"`
	ImageID string `avro:"image_id"`
}

ImageUploaded provides an avro structure for an image uploaded event

type Marshaller

type Marshaller interface {
	Marshal(s interface{}) ([]byte, error)
}

Marshaller marshals events into messages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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