appinsights

package
v2.1.32 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package AppInsightsMonitor adds Azure AppInsights webtest support in IngressMonitorController

Index

Constants

View Source
const (
	// Default value for monitor configuration
	AppInsightsStatusCodeDefaultValue   = http.StatusOK
	AppInsightsRetryEnabledDefaultValue = true
	AppInsightsFrequencyDefaultValue    = 300
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppinsightsMonitorService

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

AppinsightsMonitorService struct contains parameters required by appinsights go client

func (*AppinsightsMonitorService) Add

func (aiService *AppinsightsMonitorService) Add(monitor models.Monitor)

Add function method will add a monitor

func (*AppinsightsMonitorService) Equal

func (monitor *AppinsightsMonitorService) Equal(oldMonitor models.Monitor, newMonitor models.Monitor) bool

func (*AppinsightsMonitorService) GetAll

func (aiService *AppinsightsMonitorService) GetAll() []models.Monitor

GetAll function will return all monitors (appinsights webtest) object in an array GetAll for AppInsights returns all webtest for specific component in a resource group.

func (*AppinsightsMonitorService) GetByName

func (aiService *AppinsightsMonitorService) GetByName(monitorName string) (*models.Monitor, error)

GetByName function will return a monitors (appinsights webtest) object based on the name provided GetAll for AppInsights returns a webtest for specific resource group.

func (*AppinsightsMonitorService) Remove

func (aiService *AppinsightsMonitorService) Remove(monitor models.Monitor)

Remove method will remove a monitor

func (*AppinsightsMonitorService) Setup

func (aiService *AppinsightsMonitorService) Setup(provider config.Provider)

Setup method will initialize a appinsights's go client

func (*AppinsightsMonitorService) Update

func (aiService *AppinsightsMonitorService) Update(monitor models.Monitor)

Update method will update a monitor

type AzureConfig

type AzureConfig struct {
	Subscription_ID string
	Client_ID       string
	Client_Secret   string
	Tenant_ID       string
}

AzureConfig holds service principle credentials required of auth

type Configuration

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

Configuration holds appinsights specific configuration

type WebTest

type WebTest struct {
	XMLName     xml.Name `xml:"WebTest"`
	Xmlns       string   `xml:"xmlns,attr"`
	Name        string   `xml:"Name,attr"`
	Enabled     bool     `xml:"Enabled,attr"`
	Timeout     string   `xml:"Timeout,attr"`
	Description string   `xml:"Description,attr"`
	StopOnError bool     `xml:"StopOnError,attr"`
	Items       struct {
		Request struct {
			Method                 string `xml:"Method,attr"`
			Version                string `xml:"Version,attr"`
			URL                    string `xml:"Url,attr"`
			ThinkTime              string `xml:"ThinkTime,attr"`
			Timeout                int    `xml:"Timeout,attr"`
			Encoding               string `xml:"Encoding,attr"`
			ExpectedHttpStatusCode int    `xml:"ExpectedHttpStatusCode,attr"`
			ExpectedResponseUrl    string `xml:"ExpectedResponseUrl,attr"`
			IgnoreHttpStatusCode   bool   `xml:"IgnoreHttpStatusCode,attr"`
		} `xml:"Request"`
	} `xml:"Items"`
}

func NewWebTest

func NewWebTest() *WebTest

NewWebTest() initialize WebTest with default values

Jump to

Keyboard shortcuts

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