service

package
v0.0.0-...-96cf5d6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(listenForTopic string, publishToTopic string) *Service

func (*Service) GenericMethod

func (s *Service) GenericMethod(msg *nats.Msg) bool

GenericMethod is any generic async method in a request pipeline It would normally be triggered by nats/kafka. After processing this method would ideally publish to nats/kafka to trigger the next service/stage of the request pipeline

Noop-Testing: Before the final publish operation ->

- add publish `msg` to the context - return if ctx is noop, otherwise publish `msg` to queue

func (*Service) Publish

func (s *Service) Publish(msg *nats.Msg) bool

Publish the actual async method in a request pipeline

func (*Service) PublishTopic

func (s *Service) PublishTopic() string

func (*Service) SetPublishToTopic

func (s *Service) SetPublishToTopic(publishToTopic string)

Jump to

Keyboard shortcuts

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