mirror of
https://github.com/AdguardTeam/AdGuardDNS.git
synced 2025-02-20 11:23:36 +08:00
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package bindtodevice
|
|
|
|
import (
|
|
"log/slog"
|
|
|
|
"github.com/AdguardTeam/AdGuardDNS/internal/errcoll"
|
|
)
|
|
|
|
// ManagerConfig is the configuration structure for [NewManager]. All fields
|
|
// must be set.
|
|
type ManagerConfig struct {
|
|
// Logger is used to log the operation of the manager.
|
|
Logger *slog.Logger
|
|
|
|
// InterfaceStorage is used to get the information about the system's
|
|
// network interfaces. Normally, this is [DefaultInterfaceStorage].
|
|
InterfaceStorage InterfaceStorage
|
|
|
|
// ErrColl is the error collector that is used to collect non-critical
|
|
// errors.
|
|
ErrColl errcoll.Interface
|
|
|
|
// ChannelBufferSize is the size of the buffers of the channels used to
|
|
// dispatch TCP connections and UDP sessions.
|
|
ChannelBufferSize int
|
|
}
|
|
|
|
// ControlConfig is the configuration of socket options.
|
|
type ControlConfig struct {
|
|
// RcvBufSize defines the size of socket receive buffer in bytes. Default
|
|
// is zero (uses system settings).
|
|
RcvBufSize int
|
|
|
|
// SndBufSize defines the size of socket send buffer in bytes. Default is
|
|
// zero (uses system settings).
|
|
SndBufSize int
|
|
}
|