package collector

import (
	"context"

	"git.mchus.pro/mchus/logpile/internal/models"
)

type Request struct {
	Host             string
	Protocol         string
	Port             int
	Username         string
	AuthType         string
	Password         string
	Token            string
	TLSMode          string
	PowerOnIfHostOff bool
}

type Progress struct {
	Status   string
	Progress int
	Message  string
}

type ProgressFn func(Progress)

type ProbeResult struct {
	Reachable             bool
	Protocol              string
	HostPowerState        string
	HostPoweredOn         bool
	PowerControlAvailable bool
	SystemPath            string
}

type Connector interface {
	Protocol() string
	Collect(ctx context.Context, req Request, emit ProgressFn) (*models.AnalysisResult, error)
}

type Prober interface {
	Probe(ctx context.Context, req Request) (*ProbeResult, error)
}
