Documentation
¶
Overview ¶
Package hello implements the hello.example microservice.
The Hello microservice demonstrates the various capabilities of a microservice.
Index ¶
- Constants
- type Mock
- type Service
- func (svc *Service) BusPNG(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) Calculator(w http.ResponseWriter, r *http.Request) error
- func (svc *Service) Echo(w http.ResponseWriter, r *http.Request) error
- func (svc *Service) Hello(w http.ResponseWriter, r *http.Request) error
- func (svc *Service) Init(initializer func(svc *Service)) *Service
- func (svc *Service) Localization(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)
- func (svc *Service) Ping(w http.ResponseWriter, r *http.Request) error
- func (svc *Service) Root(w http.ResponseWriter, r *http.Request) (err error)
- func (svc *Service) TickTock(ctx context.Context) error
Constants ¶
const Hostname = "hello.example"
Hostname is the default hostname of the microservice: hello.example.
const SourceCodeSHA256 = "8f2d53a1d5ea863211c923db2febd6202d94c258567c449f6f44fbe007251d94"
const Timestamp = "2025-07-12T16:29:55.827943Z"
const Version = 294
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock = intermediate.Mock
Mock is a mockable version of the hello.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 hello.example microservice.
The Hello microservice demonstrates the various capabilities of a microservice.
func (*Service) Calculator ¶
Calculator renders a UI for a calculator. The calculation operation is delegated to another microservice in order to demonstrate a call from one microservice to another.
func (*Service) Init ¶
Init enables a single-statement pattern for initializing the microservice.
svc.Init(func(svc Service) { svc.SetGreeting("Hello") })
func (*Service) Localization ¶
Localization prints hello in the language best matching the request's Accept-Language header.
func (*Service) OnShutdown ¶
OnShutdown is called when the microservice is shut down.
Directories
¶
Path | Synopsis |
---|---|
app
|
|
Package helloapi implements the public API of the hello.example microservice, including clients and data structures.
|
Package helloapi implements the public API of the hello.example microservice, including clients and data structures. |
Package intermediate serves as the foundation of the hello.example microservice.
|
Package intermediate serves as the foundation of the hello.example microservice. |