eventsource

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package eventsource implements the eventsource.example microservice.

The event source microservice fires events that are caught by the event sink microservice.

Index

Constants

View Source
const Hostname = "eventsource.example"

Hostname is the default hostname of the microservice: eventsource.example.

View Source
const SourceCodeSHA256 = "73c4ce8eb1fab556887aa92c8a168f64588e908a8addba70e3712010708f613b"
View Source
const Timestamp = "2025-10-12T22:01:02.666545Z"
View Source
const Version = 250

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock = intermediate.Mock

Mock is a mockable version of the eventsource.example microservice, allowing functions, event sinks and web handlers to be mocked.

func NewMock

func NewMock() *Mock

New creates a new mockable version of the microservice.

type Service

type Service struct {
	*intermediate.Intermediate // DO NOT REMOVE
}

Service implements the eventsource.example microservice.

The event source microservice fires events that are caught by the event sink microservice.

func NewService

func NewService() *Service

NewService creates a new eventsource.example microservice.

func (*Service) Init

func (svc *Service) Init(initializer func(svc *Service)) *Service

Init enables a single-statement pattern for initializing the microservice.

svc.Init(func(svc Service) {
	svc.SetGreeting("Hello")
})

func (*Service) OnShutdown

func (svc *Service) OnShutdown(ctx context.Context) (err error)

OnShutdown is called when the microservice is shut down.

func (*Service) OnStartup

func (svc *Service) OnStartup(ctx context.Context) (err error)

OnStartup is called when the microservice is started up.

func (*Service) Register

func (svc *Service) Register(ctx context.Context, email string) (allowed bool, err error)

Register attempts to register a new user.

Directories

Path Synopsis
app
eventsource command
Package eventsourceapi implements the public API of the eventsource.example microservice, including clients and data structures.
Package eventsourceapi implements the public API of the eventsource.example microservice, including clients and data structures.
Package intermediate serves as the foundation of the eventsource.example microservice.
Package intermediate serves as the foundation of the eventsource.example microservice.

Jump to

Keyboard shortcuts

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