Documentation
¶
Overview ¶
Package eventsink implements the eventsink.example microservice.
The event sink microservice handles events that are fired by the event source microservice.
Index ¶
- Constants
- type Mock
- type Service
- func (svc *Service) Init(initializer func(svc *Service)) *Service
- func (svc *Service) OnAllowRegister(ctx context.Context, email string) (allow bool, err error)
- func (svc *Service) OnRegistered(ctx context.Context, email string) (err error)
- func (svc *Service) OnShutdown(ctx context.Context) (err error)
- func (svc *Service) OnStartup(ctx context.Context) (err error)
- func (svc *Service) Registered(ctx context.Context) (emails []string, err error)
Constants ¶
const Hostname = "eventsink.example"
Hostname is the default hostname of the microservice: eventsink.example.
const SourceCodeSHA256 = "07556062e9268da092451deee930daf11aeba206b2bfc3ea99e88f67e71b781e"
const Timestamp = "2025-11-08T21:18:36.934932Z"
const Version = 251
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock = intermediate.Mock
Mock is a mockable version of the eventsink.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 eventsink.example microservice.
The event sink microservice handles events that are fired by the event source microservice.
func NewService ¶
func NewService() *Service
NewService creates a new eventsink.example microservice.
func (*Service) Init ¶
Init enables a single-statement pattern for initializing the microservice.
svc.Init(func(svc Service) {
svc.SetGreeting("Hello")
})
func (*Service) OnAllowRegister ¶
OnAllowRegister blocks registrations from gmail and hotmail domains.
func (*Service) OnRegistered ¶
OnRegistered keeps track of registrations.
func (*Service) OnShutdown ¶
OnShutdown is called when the microservice is shut down.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package eventsinkapi implements the public API of the eventsink.example microservice, including clients and data structures.
|
Package eventsinkapi implements the public API of the eventsink.example microservice, including clients and data structures. |
|
Package intermediate serves as the foundation of the eventsink.example microservice.
|
Package intermediate serves as the foundation of the eventsink.example microservice. |