detectors

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetListDetectorsHandler

func GetListDetectorsHandler(azClient *azureclient.AzureClient, cfg *config.ConfigData) tools.ResourceHandler

GetListDetectorsHandler returns handler for list_detectors tool

func GetRunDetectorHandler

func GetRunDetectorHandler(azClient *azureclient.AzureClient, cfg *config.ConfigData) tools.ResourceHandler

GetRunDetectorHandler returns handler for run_detector tool

func GetRunDetectorsByCategoryHandler

func GetRunDetectorsByCategoryHandler(azClient *azureclient.AzureClient, cfg *config.ConfigData) tools.ResourceHandler

GetRunDetectorsByCategoryHandler returns handler for run_detectors_by_category tool

func HandleListDetectors

func HandleListDetectors(params map[string]interface{}, client *DetectorClient) (string, error)

HandleListDetectors implements the list_detectors functionality

func HandleRunDetector

func HandleRunDetector(params map[string]interface{}, client *DetectorClient) (string, error)

HandleRunDetector implements the run_detector functionality

func HandleRunDetectorsByCategory

func HandleRunDetectorsByCategory(params map[string]interface{}, client *DetectorClient) (string, error)

HandleRunDetectorsByCategory implements the run_detectors_by_category functionality

func RegisterListDetectorsTool

func RegisterListDetectorsTool() mcp.Tool

RegisterListDetectorsTool registers the list_detectors MCP tool

func RegisterRunDetectorTool

func RegisterRunDetectorTool() mcp.Tool

RegisterRunDetectorTool registers the run_detector MCP tool

func RegisterRunDetectorsByCategoryTool

func RegisterRunDetectorsByCategoryTool() mcp.Tool

RegisterRunDetectorsByCategoryTool registers the run_detectors_by_category MCP tool

Types

type Detector

type Detector struct {
	ID         string             `json:"id"`
	Name       string             `json:"name"`
	Type       string             `json:"type"`
	Location   string             `json:"location"`
	Properties DetectorProperties `json:"properties"`
}

Detector represents a single detector metadata

type DetectorClient

type DetectorClient struct {
	// contains filtered or unexported fields
}

DetectorClient wraps Azure API calls with caching

func NewDetectorClient

func NewDetectorClient(azClient *azureclient.AzureClient) *DetectorClient

NewDetectorClient creates a new detector client

func (*DetectorClient) GetDetectorsByCategory

func (c *DetectorClient) GetDetectorsByCategory(ctx context.Context, subscriptionID, resourceGroup, clusterName, category string) ([]Detector, error)

GetDetectorsByCategory filters detectors by category from cached list

func (*DetectorClient) ListDetectors

func (c *DetectorClient) ListDetectors(ctx context.Context, subscriptionID, resourceGroup, clusterName string) (*DetectorListResponse, error)

ListDetectors lists all detectors for a cluster with caching

func (*DetectorClient) RunDetector

func (c *DetectorClient) RunDetector(ctx context.Context, subscriptionID, resourceGroup, clusterName, detectorName, startTime, endTime string) (*DetectorRunResponse, error)

RunDetector executes a specific detector

func (*DetectorClient) RunDetectorsByCategory

func (c *DetectorClient) RunDetectorsByCategory(ctx context.Context, subscriptionID, resourceGroup, clusterName, category, startTime, endTime string) ([]DetectorRunResponse, error)

RunDetectorsByCategory executes all detectors in a specific category

type DetectorColumn

type DetectorColumn struct {
	ColumnName string  `json:"columnName"`
	ColumnType *string `json:"columnType"`
	DataType   string  `json:"dataType"`
}

DetectorColumn defines table column metadata

type DetectorDataset

type DetectorDataset struct {
	RenderingProperties RenderingProperties `json:"renderingProperties"`
	Table               DetectorTable       `json:"table"`
}

DetectorDataset represents detector output data

type DetectorListResponse

type DetectorListResponse struct {
	Value []Detector `json:"value"`
}

DetectorListResponse represents the API response for listing detectors

type DetectorMetadata

type DetectorMetadata struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Category    string `json:"category"`
	Description string `json:"description"`
	Type        string `json:"type"`
}

DetectorMetadata contains detector information

type DetectorProperties

type DetectorProperties struct {
	Metadata DetectorMetadata `json:"metadata"`
	Status   DetectorStatus   `json:"status"`
}

DetectorProperties contains detector metadata

type DetectorRunProperties

type DetectorRunProperties struct {
	Dataset  []DetectorDataset `json:"dataset"`
	Metadata DetectorMetadata  `json:"metadata"`
	Status   DetectorStatus    `json:"status"`
}

DetectorRunProperties contains detector run results

type DetectorRunResponse

type DetectorRunResponse struct {
	ID         string                `json:"id"`
	Name       string                `json:"name"`
	Type       string                `json:"type"`
	Location   string                `json:"location"`
	Properties DetectorRunProperties `json:"properties"`
}

DetectorRunResponse represents the API response for running a detector

type DetectorStatus

type DetectorStatus struct {
	Message  *string `json:"message"`
	StatusID int     `json:"statusId"`
}

DetectorStatus contains detector status

type DetectorTable

type DetectorTable struct {
	Columns   []DetectorColumn `json:"columns"`
	Rows      [][]interface{}  `json:"rows"`
	TableName string           `json:"tableName"`
}

DetectorTable contains tabular detector results

type RenderingProperties

type RenderingProperties struct {
	Description *string `json:"description"`
	IsVisible   bool    `json:"isVisible"`
	Title       *string `json:"title"`
	Type        int     `json:"type"`
}

RenderingProperties defines how to display results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL