{"modulePath":"github.com/utmstack/UTMStack/plugins/feeds","version":"v0.0.0-20261126134315-738f65073a40","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package client\n\n## Types\n\n```go\ntype AlertClient struct {\n\t// contains filtered or unexported fields\n}\n```\nAlertClient reads alerts an incident refers to. Read-only: this plugin enriches incidents from alerts and never writes one.\n\n```go\nfunc NewAlertClient(cfg *config.TWConfig) (*AlertClient, error)\n```\n\n```go\nfunc (c *AlertClient) Close() error\n```\n\n```go\nfunc (c *AlertClient) GetAlertByID(ctx context.Context, alertID string) (*models.Alert, error)\n```\nGetAlertByID looks an alert up across every tenant, which the scope has to name explicitly. An incident carries no tenant of its own, so there is none to scope by; the identifier is a UUID, so the lookup stays unambiguous even though it is unscoped.\n\n```go\ntype BackendClient struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewBackendClient(cfg *config.TWConfig) *BackendClient\n```\n\n```go\nfunc (c *BackendClient) GetIncidentAlerts(ctx context.Context, incidentID string) ([]*models.IncidentAlert, error)\n```\n\n```go\nfunc (c *BackendClient) GetRecentIncidents(ctx context.Context) ([]*models.Incident, error)\n```\n\n```go\ntype ClientDependencies struct {\n\tBackend     *BackendClient\n\tCM          *CustomersManagerClient\n\tThreadWinds *ThreadWindsClient\n\tAlerts      *AlertClient\n}\n```\n\n```go\nfunc NewClientDependencies(cfg *config.TWConfig, ic *CustomersManagerClient) (*ClientDependencies, error)\n```\n\n```go\ntype CustomersManagerClient struct {\n\tServer      string `yaml:\"server\"`\n\tInstanceID  string `yaml:\"instance_id\"`\n\tInstanceKey string `yaml:\"instance_key\"`\n}\n```\n\n```go\nfunc (c *CustomersManagerClient) LoadInstanceConfig() error\n```\n\n```go\ntype EntityIngestResult struct {\n\tEntity *entities.Entity\n\tErr    error\n\tStatus int\n}\n```\n\n```go\ntype IngestOutcome struct {\n\tOKCount             int\n\tFailures            []EntityIngestResult\n\tProvisioningBlocked bool\n}\n```\n\n```go\ntype ThreadWindsClient struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewThreadWindsClient(ic *CustomersManagerClient) *ThreadWindsClient\n```\n\n```go\nfunc (c *ThreadWindsClient) IngestBatch(ctx context.Context, batch []*entities.Entity) IngestOutcome\n```\n\n","path":"github.com/utmstack/UTMStack/plugins/feeds/internal/client","name":"client","synopsis":"","isRedistributable":true}
