Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LogQueryClients map[string]*azquery.LogsClient
LogQueryClients holds the Azure Logs clients for different subscriptions This is a global variable to avoid creating a new client for each query
Functions ¶
func CreateLogsClient ¶
func CreateLogsClient(sess *Session, subscriptionID string) (*azquery.LogsClient, error)
CreateLogsClient creates a cached Azure Log Analytics client for the specified subscription
func InitializeAzureAuthentication ¶
InitializeAzureAuthentication sets up Azure authentication using modern SDK
Types ¶
type AZClientSecretCredential ¶
AZClientSecretCredential holds Azure service principal credentials
type AZSession ¶
type AZSession struct {
Credential azcore.TokenCredential
ClientSecretCredential AZClientSecretCredential
}
AZSession holds Azure authentication and client information
type QueryFile ¶
type QueryFile struct {
Title string `yaml:"title"` // Display title for the query
SubscriptionID string `yaml:"azure_subscription_id"` // Azure subscription ID
WorkspaceID string `yaml:"azure_workspace_id"` // Log Analytics workspace ID
Columns []string `yaml:"columns"` // Expected column names
Query string `yaml:"query"` // KQL query string
}
QueryFile represents the structure of a query configuration file
type Session ¶
type Session struct {
App struct {
SemVer string
}
Azure *AZSession
QueriesPath string
QueryFile QueryFile
}
Session holds the configuration and state for an Azure Log Analytics session
type Settings ¶
type Settings struct {
*cfg.Common
// Queryfile is the path to the YAML file containing the Azure query configuration
Queryfile string `help:"Path to YAML file containing Azure Log Analytics query configuration"`
}
Settings defines the configuration for the Azure Logs widget
type TableRow ¶
type TableRow []string
TableRow represents a single row of data from Azure Log Analytics
type Widget ¶
type Widget struct {
view.TextWidget
// contains filtered or unexported fields
}
func NewWidget ¶
func NewWidget(tviewApp *tview.Application, redrawChan chan bool, _ *tview.Pages, settings *Settings) *Widget
NewWidget creates a new instance of a widget