mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-02-18 23:41:48 +01:00
refactor(dead-code): remove unused symbols in internal/servicediscovery
This commit is contained in:
@@ -43,12 +43,6 @@ type DiscoveryCommand struct {
|
||||
Optional bool `json:"optional"` // If true, don't fail if command fails
|
||||
}
|
||||
|
||||
// CommandSet represents a set of commands for a resource type.
|
||||
type CommandSet struct {
|
||||
ResourceType ResourceType
|
||||
Commands []DiscoveryCommand
|
||||
}
|
||||
|
||||
// GetCommandsForResource returns the commands to run for a given resource type.
|
||||
func GetCommandsForResource(resourceType ResourceType) []DiscoveryCommand {
|
||||
switch resourceType {
|
||||
@@ -551,13 +545,3 @@ func GetCommandCategories(resourceType ResourceType) []string {
|
||||
|
||||
return categories
|
||||
}
|
||||
|
||||
// GetCommandSummary returns a human-readable list of commands for a resource type.
|
||||
func GetCommandSummary(resourceType ResourceType) []string {
|
||||
commands := GetCommandsForResource(resourceType)
|
||||
summaries := make([]string, 0, len(commands))
|
||||
for _, cmd := range commands {
|
||||
summaries = append(summaries, cmd.Command)
|
||||
}
|
||||
return summaries
|
||||
}
|
||||
|
||||
@@ -242,8 +242,3 @@ func GenerateK8sPodFingerprint(clusterID string, pod *KubernetesPod) *ContainerF
|
||||
|
||||
return fp
|
||||
}
|
||||
|
||||
// GenerateFingerprint is an alias for GenerateDockerFingerprint for backwards compatibility.
|
||||
func GenerateFingerprint(hostID string, container *DockerContainer) *ContainerFingerprint {
|
||||
return GenerateDockerFingerprint(hostID, container)
|
||||
}
|
||||
|
||||
@@ -211,12 +211,6 @@ type AIAnalyzer interface {
|
||||
AnalyzeForDiscovery(ctx context.Context, prompt string) (string, error)
|
||||
}
|
||||
|
||||
// WSMessage represents a WebSocket message for broadcasting.
|
||||
type WSMessage struct {
|
||||
Type string `json:"type"`
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
// WSBroadcaster provides WebSocket broadcasting capabilities.
|
||||
type WSBroadcaster interface {
|
||||
BroadcastDiscoveryProgress(progress *DiscoveryProgress)
|
||||
|
||||
@@ -26,11 +26,8 @@ type FactCategory string
|
||||
|
||||
const (
|
||||
FactCategoryVersion FactCategory = "version"
|
||||
FactCategoryConfig FactCategory = "config"
|
||||
FactCategoryService FactCategory = "service"
|
||||
FactCategoryPort FactCategory = "port"
|
||||
FactCategoryHardware FactCategory = "hardware"
|
||||
FactCategoryNetwork FactCategory = "network"
|
||||
FactCategoryStorage FactCategory = "storage"
|
||||
FactCategoryDependency FactCategory = "dependency"
|
||||
FactCategorySecurity FactCategory = "security"
|
||||
@@ -40,21 +37,19 @@ const (
|
||||
type ServiceCategory string
|
||||
|
||||
const (
|
||||
CategoryDatabase ServiceCategory = "database"
|
||||
CategoryWebServer ServiceCategory = "web_server"
|
||||
CategoryCache ServiceCategory = "cache"
|
||||
CategoryMessageQueue ServiceCategory = "message_queue"
|
||||
CategoryMonitoring ServiceCategory = "monitoring"
|
||||
CategoryBackup ServiceCategory = "backup"
|
||||
CategoryNVR ServiceCategory = "nvr"
|
||||
CategoryStorage ServiceCategory = "storage"
|
||||
CategoryContainer ServiceCategory = "container"
|
||||
CategoryVirtualizer ServiceCategory = "virtualizer"
|
||||
CategoryNetwork ServiceCategory = "network"
|
||||
CategorySecurity ServiceCategory = "security"
|
||||
CategoryMedia ServiceCategory = "media"
|
||||
CategoryHomeAuto ServiceCategory = "home_automation"
|
||||
CategoryUnknown ServiceCategory = "unknown"
|
||||
CategoryDatabase ServiceCategory = "database"
|
||||
CategoryWebServer ServiceCategory = "web_server"
|
||||
CategoryCache ServiceCategory = "cache"
|
||||
CategoryMonitoring ServiceCategory = "monitoring"
|
||||
CategoryBackup ServiceCategory = "backup"
|
||||
CategoryNVR ServiceCategory = "nvr"
|
||||
CategoryStorage ServiceCategory = "storage"
|
||||
CategoryVirtualizer ServiceCategory = "virtualizer"
|
||||
CategoryNetwork ServiceCategory = "network"
|
||||
CategorySecurity ServiceCategory = "security"
|
||||
CategoryMedia ServiceCategory = "media"
|
||||
CategoryHomeAuto ServiceCategory = "home_automation"
|
||||
CategoryUnknown ServiceCategory = "unknown"
|
||||
)
|
||||
|
||||
// ResourceDiscovery is the main data model for discovered resource information.
|
||||
@@ -176,11 +171,8 @@ type DiscoveryRequest struct {
|
||||
type DiscoveryStatus string
|
||||
|
||||
const (
|
||||
DiscoveryStatusPending DiscoveryStatus = "pending"
|
||||
DiscoveryStatusRunning DiscoveryStatus = "running"
|
||||
DiscoveryStatusCompleted DiscoveryStatus = "completed"
|
||||
DiscoveryStatusFailed DiscoveryStatus = "failed"
|
||||
DiscoveryStatusNotStarted DiscoveryStatus = "not_started"
|
||||
DiscoveryStatusRunning DiscoveryStatus = "running"
|
||||
DiscoveryStatusCompleted DiscoveryStatus = "completed"
|
||||
)
|
||||
|
||||
// DiscoveryProgress represents the progress of an ongoing discovery.
|
||||
|
||||
Reference in New Issue
Block a user