agh

package
v0.108.0-b.8 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

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