// Package portcheck provides TCP port connectivity checking. package portcheck import ( "context" "errors" "log/slog" "go.uber.org/fx" "sneak.berlin/go/dnswatcher/internal/logger" ) // ErrNotImplemented indicates the port checker is not yet implemented. var ErrNotImplemented = errors.New( "port checker not yet implemented", ) // Params contains dependencies for Checker. type Params struct { fx.In Logger *logger.Logger } // Checker performs TCP port connectivity checks. type Checker struct { log *slog.Logger } // New creates a new port Checker instance. func New( _ fx.Lifecycle, params Params, ) (*Checker, error) { return &Checker{ log: params.Logger.Get(), }, nil } // CheckPort tests TCP connectivity to the given address and port. func (c *Checker) CheckPort( _ context.Context, _ string, _ int, ) (bool, error) { return false, ErrNotImplemented }