Documentation
¶
Index ¶
Constants ¶
View Source
const ( Hostname = browserapi.Hostname Version = 134 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Intermediate ¶ added in v1.22.0
Intermediate extends and customizes the generic base connector.
func NewIntermediate ¶ added in v1.22.0
func NewIntermediate(impl ToDo) *Intermediate
NewIntermediate creates a new instance of the intermediate.
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) MockBrowse ¶ added in v1.22.0
MockBrowse sets up a mock handler for Browse.
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 browser.example microservice.
The browser microservice implements a simple web browser that utilizes the egress proxy.
func (*Service) OnShutdown ¶
OnShutdown is called when the microservice is shut down.
type ToDo ¶ added in v1.22.0
type ToDo interface {
OnStartup(ctx context.Context) (err error)
OnShutdown(ctx context.Context) (err error)
Browse(w http.ResponseWriter, r *http.Request) (err error) // MARKER: Browse
}
ToDo is implemented by the service or mock. The intermediate delegates handling to this interface.
Click to show internal directories.
Click to hide internal directories.