greetingworker

package
v0.0.0-...-fcddabd Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 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 HelloWorldEventLogger

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

HelloWorldEventLogger logs hello world events.

func NewHelloWorldEventLogger

func NewHelloWorldEventLogger(logger Logger) *HelloWorldEventLogger

NewHelloWorldEventLogger returns a new HelloWorldEventLogger.

func (*HelloWorldEventLogger) SaidHello

func (e *HelloWorldEventLogger) SaidHello(ctx context.Context, event SaidHello) error

SaidHello logs a SaidHello event.

type Logger

type Logger interface {
	// Debug logs an info event.
	Debug(msg string, fields ...map[string]interface{})

	// Info logs an info event.
	Info(msg string, fields ...map[string]interface{})

	// WithFields annotates a logger with some context.
	WithFields(fields map[string]interface{}) Logger
}

Logger is the fundamental interface for all log operations.

type SaidHello

type SaidHello struct {
	Message string
}

SaidHello indicates that hello was said.

type SaidHelloTo

type SaidHelloTo struct {
	Message string
	Who     string
}

SaidHelloTo indicates that hello was said to someone.

type SayHelloEventLogger

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

SayHelloEventLogger logs hello world events.

func NewSayHelloEventLogger

func NewSayHelloEventLogger(logger Logger) *SayHelloEventLogger

NewSayHelloEventLogger returns a new SayHelloEventLogger.

func (*SayHelloEventLogger) SaidHelloTo

func (e *SayHelloEventLogger) SaidHelloTo(ctx context.Context, event SaidHelloTo) error

SaidHelloTo logs a SaidHelloTo event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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