daemons

package
v0.0.0-...-cf97348 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NumberPrinter

type NumberPrinter struct {
	shezmu.BaseDaemon
}

NumberPrinter is a daemon that prints numbers once in a while.

func (*NumberPrinter) Startup

func (n *NumberPrinter) Startup()

Startup sets up panic handler and starts enqueuing number printing jobs.

type PriceConsumer

type PriceConsumer struct {
	consumer.Consumer
}

PriceConsumer consumes price update messages and prints them to the console.

func (*PriceConsumer) Startup

func (p *PriceConsumer) Startup()

Startup creates a new subscription for ProductPriceUpdates topic.

type PriceUpdate

type PriceUpdate struct {
	Product string  `json:"product"`
	Amount  float64 `json:"amount"`
}

PriceUpdate describes a price update message.

Jump to

Keyboard shortcuts

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