appinsights

package
v0.0.0-...-9963b81 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationInsightsManager

type ApplicationInsightsManager interface {
	CreateAppInsights(
		ctx context.Context,
		resourceGroupName string,
		kind string,
		applicationType string,
		location string,
		resourceName string) (*insights.ApplicationInsightsComponent, error)
	DeleteAppInsights(ctx context.Context, resourceGroupName string, resourceName string) (autorest.Response, error)
	GetAppInsights(ctx context.Context, resourceGroupName string, resourceName string) (insights.ApplicationInsightsComponent, error)

	StoreSecrets(ctx context.Context, secretClient secrets.SecretClient, instrumentationKey string, instance *v1alpha1.AppInsights) error

	DeleteSecret(ctx context.Context, secretClient secrets.SecretClient, instance *v1alpha1.AppInsights) error

	// ARM Client
	resourcemanager.ARMClient
}

ApplicationInsightsManager manages Azure Application Insights service components

type InsightsAPIKeysClient

type InsightsAPIKeysClient struct {
	Creds        config.Credentials
	SecretClient secrets.SecretClient
	Scheme       *runtime.Scheme
}

func NewAPIKeyClient

func NewAPIKeyClient(creds config.Credentials, secretClient secrets.SecretClient, scheme *runtime.Scheme) *InsightsAPIKeysClient

func (*InsightsAPIKeysClient) CreateKey

func (c *InsightsAPIKeysClient) CreateKey(ctx context.Context, resourceGroup, insightsaccount, name string, read, write, authSDK bool) (insights.ApplicationInsightsComponentAPIKey, error)

func (*InsightsAPIKeysClient) Delete

func (*InsightsAPIKeysClient) DeleteKey

func (c *InsightsAPIKeysClient) DeleteKey(ctx context.Context, resourceGroup, insightsaccount, name string) error

func (*InsightsAPIKeysClient) Ensure

func (*InsightsAPIKeysClient) GetKey

func (c *InsightsAPIKeysClient) GetKey(ctx context.Context, resourceGroup, insightsaccount, name string) (insights.ApplicationInsightsComponentAPIKey, error)

func (*InsightsAPIKeysClient) GetParents

func (*InsightsAPIKeysClient) GetStatus

func (*InsightsAPIKeysClient) ListKeys

func (c *InsightsAPIKeysClient) ListKeys(ctx context.Context, resourceGroup, insightsaccount string) (insights.ApplicationInsightsComponentAPIKeyListResult, error)

type Manager

type Manager struct {
	Creds        config.Credentials
	SecretClient secrets.SecretClient
	Scheme       *runtime.Scheme
}

Manager manages Azure Application Insights services

func NewManager

func NewManager(creds config.Credentials, secretClient secrets.SecretClient, scheme *runtime.Scheme) *Manager

NewManager creates a new AppInsights Manager

func (*Manager) CreateAppInsights

func (m *Manager) CreateAppInsights(
	ctx context.Context,
	resourceGroupName string,
	kind string,
	applicationType string,
	location string,
	resourceName string) (*insights.ApplicationInsightsComponent, error)

CreateAppInsights creates or updates an Application Insights service

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)

Delete removes an AppInsights resource

func (*Manager) DeleteAppInsights

func (m *Manager) DeleteAppInsights(
	ctx context.Context,
	resourceGroupName string,
	resourceName string) (autorest.Response, error)

DeleteAppInsights removes an Application Insights service from a subscription

func (*Manager) DeleteSecret

func (m *Manager) DeleteSecret(ctx context.Context, secretClient secrets.SecretClient, instance *v1alpha1.AppInsights) error

DeleteSecret deletes the secret information for this app insight

func (*Manager) Ensure

func (m *Manager) Ensure(ctx context.Context, obj runtime.Object, opts ...resourcemanager.ConfigOption) (bool, error)

Ensure checks the desired state of the operator

func (*Manager) GetAppInsights

func (m *Manager) GetAppInsights(
	ctx context.Context,
	resourceGroupName string,
	resourceName string) (insights.ApplicationInsightsComponent, error)

GetAppInsights fetches an Application Insights service reference

func (*Manager) GetParents

func (m *Manager) GetParents(obj runtime.Object) ([]resourcemanager.KubeParent, error)

GetParents fetches dependent ARM resources

func (*Manager) GetStatus

func (m *Manager) GetStatus(obj runtime.Object) (*v1alpha1.ASOStatus, error)

func (*Manager) StoreSecrets

func (m *Manager) StoreSecrets(ctx context.Context, secretClient secrets.SecretClient, instrumentationKey string, instance *v1alpha1.AppInsights) error

StoreSecrets upserts the secret information for this app insight

Jump to

Keyboard shortcuts

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