agh

package
v0.107.55 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package agh contains common entities and interfaces of AdGuard Home.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyServiceWithConfig

type EmptyServiceWithConfig[ConfigType any] struct {
	service.Empty

	Conf ConfigType
}

EmptyServiceWithConfig is a ServiceWithConfig that does nothing. Its Config method returns Conf.

TODO(a.garipov): Remove if unnecessary.

func (*EmptyServiceWithConfig[ConfigType]) Config

func (s *EmptyServiceWithConfig[ConfigType]) Config() (conf ConfigType)

Config implements the ServiceWithConfig interface for *EmptyServiceWithConfig.

type ServiceWithConfig

type ServiceWithConfig[ConfigType any] interface {
	service.Interface

	Config() (c ConfigType)
}

ServiceWithConfig is an extension of the [Service] interface for services that can return their configuration.

TODO(a.garipov): Consider removing this generic interface if we figure out how to make it testable in a better way.

Jump to

Keyboard shortcuts

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