greetingadapter

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: 8 Imported by: 0

Documentation

Overview

nolint: dupl

nolint: dupl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloWorldEvents

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

HelloWorldEvents is the dispatcher for hello world events.

func NewHelloWorldEvents

func NewHelloWorldEvents(publisher message.Publisher) *HelloWorldEvents

NewHelloWorldEvents returns a new HelloWorldEvents instance.

func (*HelloWorldEvents) SaidHello

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

SaidHello dispatches a SaidHello event.

type Logger

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

Logger wraps a logur logger and exposes it under a custom interface.

func NewLogger

func NewLogger(logger logur.Logger) *Logger

NewLogger returns a new Logger instance.

func NewNoopLogger

func NewNoopLogger() *Logger

NewNoopLogger returns a logger that discards all received log events.

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...map[string]interface{})

Debug logs a debug event.

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...map[string]interface{})

Error logs an error event.

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...map[string]interface{})

Info logs an info event.

func (*Logger) Trace

func (l *Logger) Trace(msg string, fields ...map[string]interface{})

Trace logs a trace event.

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...map[string]interface{})

Warn logs a warning event.

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[string]interface{}) greeting.Logger

WithFields annotates a logger with some context.

type SayHelloEvents

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

SayHelloEvents is the dispatcher for hello world events.

func NewSayHelloEvents

func NewSayHelloEvents(publisher message.Publisher) *SayHelloEvents

NewSayHelloEvents returns a new SayHelloEvents instance.

func (*SayHelloEvents) SaidHelloTo

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

SaidHelloTo dispatches a SaidHelloTo event.

Jump to

Keyboard shortcuts

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