Documentation
¶
Overview ¶
Package websvc contains the AdGuard Home web service.
TODO(a.garipov): Add tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// TLS is the optional TLS configuration. If TLS is not nil,
// SecureAddresses must not be empty.
TLS *tls.Config
// Addresses are the addresses on which to serve the plain HTTP API.
Addresses []*netutil.IPPort
// SecureAddresses are the addresses on which to serve the HTTPS API. If
// SecureAddresses is not empty, TLS must not be nil.
SecureAddresses []*netutil.IPPort
// Timeout is the timeout for all server operations.
Timeout time.Duration
}
Config is the AdGuard Home web service configuration structure.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the AdGuard Home web service. A nil *Service is a valid service that does nothing.
func New ¶
New returns a new properly initialized *Service. If c is nil, svc is a nil *Service that does nothing.
func (*Service) Addrs ¶
Addrs returns all addresses on which this server serves the HTTP API. Addrs must not be called until Start returns.
Click to show internal directories.
Click to hide internal directories.