38 lines
1.1 KiB
Go
Raw Normal View History

2023-03-18 17:11:10 +03:00
package bindtodevice
2024-10-14 17:44:24 +03:00
import (
"log/slog"
"github.com/AdguardTeam/AdGuardDNS/internal/errcoll"
)
2023-03-18 17:11:10 +03:00
// ManagerConfig is the configuration structure for [NewManager]. All fields
// must be set.
type ManagerConfig struct {
2024-10-14 17:44:24 +03:00
// Logger is used to log the operation of the manager.
Logger *slog.Logger
2023-06-11 12:58:40 +03:00
// InterfaceStorage is used to get the information about the system's
// network interfaces. Normally, this is [DefaultInterfaceStorage].
InterfaceStorage InterfaceStorage
2023-03-18 17:11:10 +03:00
// ErrColl is the error collector that is used to collect non-critical
// errors.
2024-01-04 19:22:32 +03:00
ErrColl errcoll.Interface
2023-03-18 17:11:10 +03:00
// ChannelBufferSize is the size of the buffers of the channels used to
// dispatch TCP connections and UDP sessions.
ChannelBufferSize int
}
2023-06-11 12:58:40 +03:00
// 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
}