Documentation ¶
Overview ¶
Package agh contains common entities and interfaces of AdGuard Home.
TODO(a.garipov): Move to the upper-level internal/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyService ¶
type EmptyService struct{}
EmptyService is a Service that does nothing.
func (EmptyService) Shutdown ¶
func (EmptyService) Shutdown(_ context.Context) (err error)
Shutdown implements the Service interface for EmptyService.
func (EmptyService) Start ¶
func (EmptyService) Start() (err error)
Start implements the Service interface for EmptyService.
type Service ¶
type Service interface { // Start starts the service. It does not block. Start() (err error) // Shutdown gracefully stops the service. ctx is used to determine // a timeout before trying to stop the service less gracefully. Shutdown(ctx context.Context) (err error) }
Service is the interface for API servers.
TODO(a.garipov): Consider adding a context to Start.
TODO(a.garipov): Consider adding a Wait method or making an extension interface for that.
Click to show internal directories.
Click to hide internal directories.