client

package
v0.0.0-...-738f650 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertClient

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

AlertClient reads alerts an incident refers to. Read-only: this plugin enriches incidents from alerts and never writes one.

func NewAlertClient

func NewAlertClient(cfg *config.TWConfig) (*AlertClient, error)

func (*AlertClient) Close

func (c *AlertClient) Close() error

func (*AlertClient) GetAlertByID

func (c *AlertClient) GetAlertByID(ctx context.Context, alertID string) (*models.Alert, error)

GetAlertByID 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.

type BackendClient

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

func NewBackendClient

func NewBackendClient(cfg *config.TWConfig) *BackendClient

func (*BackendClient) GetIncidentAlerts

func (c *BackendClient) GetIncidentAlerts(ctx context.Context, incidentID string) ([]*models.IncidentAlert, error)

func (*BackendClient) GetRecentIncidents

func (c *BackendClient) GetRecentIncidents(ctx context.Context) ([]*models.Incident, error)

type ClientDependencies

type ClientDependencies struct {
	Backend     *BackendClient
	CM          *CustomersManagerClient
	ThreadWinds *ThreadWindsClient
	Alerts      *AlertClient
}

func NewClientDependencies

func NewClientDependencies(cfg *config.TWConfig, ic *CustomersManagerClient) (*ClientDependencies, error)

type CustomersManagerClient

type CustomersManagerClient struct {
	Server      string `yaml:"server"`
	InstanceID  string `yaml:"instance_id"`
	InstanceKey string `yaml:"instance_key"`
}

func (*CustomersManagerClient) LoadInstanceConfig

func (c *CustomersManagerClient) LoadInstanceConfig() error

type EntityIngestResult

type EntityIngestResult struct {
	Entity *entities.Entity
	Err    error
	Status int
}

type IngestOutcome

type IngestOutcome struct {
	OKCount             int
	Failures            []EntityIngestResult
	ProvisioningBlocked bool
}

type ThreadWindsClient

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

func NewThreadWindsClient

func NewThreadWindsClient(ic *CustomersManagerClient) *ThreadWindsClient

func (*ThreadWindsClient) IngestBatch

func (c *ThreadWindsClient) IngestBatch(ctx context.Context, batch []*entities.Entity) IngestOutcome

Jump to

Keyboard shortcuts

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