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 = "f9e6ef1c9a1d9a2d49498daeb377e5c06caad04dfecb909f4c3e28d84fdaeeca"
const Timestamp = "2024-08-01T15:49:27.6478Z"
const Version = 259
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. |