Documentation
¶
Overview ¶
Package messaging implements the messaging.example microservice.
The Messaging microservice demonstrates service-to-service communication patterns.
Index ¶
- Constants
- type Mock
- type Service
- func (svc *Service) CacheLoad(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) CacheStore(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) DefaultQueue(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) Home(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) Init(initializer func(svc *Service)) *Service
- func (svc *Service) NoQueue(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) OnShutdown(ctx context.Context) (err error)
- func (svc *Service) OnStartup(ctx context.Context) (err error)
Constants ¶
const Hostname = "messaging.example"
Hostname is the default hostname of the microservice: messaging.example.
const SourceCodeSHA256 = "0e029965199e2005713eda5d993b096425d194889f0d346c30ee1657281486cd"
const Timestamp = "2025-07-12T16:29:56.141064Z"
const Version = 204
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock = intermediate.Mock
Mock is a mockable version of the messaging.example microservice, allowing functions, event sinks and web handlers to be mocked.
type Service ¶
type Service struct {
*intermediate.Intermediate // DO NOT REMOVE
}
Service implements the messaging.example microservice.
The Messaging microservice demonstrates service-to-service communication patterns.
func NewService ¶
func NewService() *Service
NewService creates a new messaging.example microservice.
func (*Service) CacheLoad ¶
CacheLoad looks up an element in the distributed cache of the microservice.
func (*Service) CacheStore ¶
CacheStore stores an element in the distributed cache of the microservice.
func (*Service) DefaultQueue ¶
DefaultQueue demonstrates how the DefaultQueue subscription option is used to create a unicast request/response communication pattern. Only one of the instances of this microservice will respond to each request.
func (*Service) Home ¶
Home demonstrates making requests using multicast and unicast request/response patterns.
func (*Service) Init ¶
Init enables a single-statement pattern for initializing the microservice.
svc.Init(func(svc Service) { svc.SetGreeting("Hello") })
func (*Service) NoQueue ¶
NoQueue demonstrates how the NoQueue subscription option is used to create a multicast request/response communication pattern. All instances of this microservice will respond to each request.
func (*Service) OnShutdown ¶
OnShutdown is called when the microservice is shut down.
Directories
¶
Path | Synopsis |
---|---|
app
|
|
Package intermediate serves as the foundation of the messaging.example microservice.
|
Package intermediate serves as the foundation of the messaging.example microservice. |
Package messagingapi implements the public API of the messaging.example microservice, including clients and data structures.
|
Package messagingapi implements the public API of the messaging.example microservice, including clients and data structures. |