producer

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGenerateEventEndpoint added in v0.2.1

func MakeGenerateEventEndpoint(svc Service) endpoint.Endpoint

func Middleware added in v0.2.1

func Middleware(producer endpoint.Endpoint) endpoint.Middleware

func NewHTTPHandler added in v0.2.1

func NewHTTPHandler(endpoints Endpoints) http.Handler

func NewKafkaProducer added in v0.2.1

func NewKafkaProducer(handler kafka.Handler, topic string) *transport.Producer

Types

type Endpoints added in v0.2.1

type Endpoints struct {
	GenerateEvent endpoint.Endpoint
}

type GenerateEventRequest added in v0.2.1

type GenerateEventRequest struct {
}

type GenerateEventResponse added in v0.2.1

type GenerateEventResponse struct {
	Result *domain.Event
}

type GeneratorService added in v0.2.1

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

func NewGeneratorService added in v0.2.1

func NewGeneratorService(logger log.Logger) (*GeneratorService, error)

func (*GeneratorService) Generate added in v0.2.1

func (svc *GeneratorService) Generate(_ context.Context) (*domain.Event, error)

type ProduceEventRequest added in v0.2.1

type ProduceEventRequest struct {
	Payload *domain.Event
}

type ProduceEventResponse added in v0.2.1

type ProduceEventResponse struct {
}

type Service

type Service interface {
	Generate(ctx context.Context) (*domain.Event, error)
}

Jump to

Keyboard shortcuts

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