Documentation
¶
Index ¶
- Constants
- type Intermediate
- type Mock
- func (svc *Mock) MockRegister(handler func(ctx context.Context, email string) (allowed bool, err error)) *Mock
- func (svc *Mock) OnShutdown(ctx context.Context) (err error)
- func (svc *Mock) OnStartup(ctx context.Context) (err error)
- func (svc *Mock) Register(ctx context.Context, email string) (allowed bool, err error)
- type Service
- type ToDo
Constants ¶
View Source
const ( Hostname = eventsourceapi.Hostname Version = 270 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Intermediate ¶ added in v1.22.0
Intermediate is the intermediary between the microservice and the connector.
func NewIntermediate ¶ added in v1.22.0
func NewIntermediate(impl ToDo) *Intermediate
NewIntermediate creates a new intermediary for the microservice.
type Mock ¶
type Mock struct {
*Intermediate
// contains filtered or unexported fields
}
Mock is a mockable version of the microservice, allowing functions, event sinks and web handlers to be mocked.
func (*Mock) MockRegister ¶ added in v1.22.0
func (svc *Mock) MockRegister(handler func(ctx context.Context, email string) (allowed bool, err error)) *Mock
MockRegister sets up a mock handler for Register.
func (*Mock) OnShutdown ¶ added in v1.22.0
OnShutdown is called when the microservice is shut down.
type Service ¶
type Service struct {
*Intermediate // IMPORTANT: Do not remove
}
Service implements the eventsource.example microservice.
The event source microservice fires events that are caught by the event sink microservice.
func (*Service) OnShutdown ¶
OnShutdown is called when the microservice is shut down.
Click to show internal directories.
Click to hide internal directories.