endpoints

package
v0.0.0-...-1a60cd4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountAppsPerNamespace

func CountAppsPerNamespace(ctx context.Context) (map[string]int, error)

returns a map, where the key is a namespace name and the value is the number of apps in this namespace (not necessarily instrumented)

func CreateInstrumentationRule

func CreateInstrumentationRule(c *gin.Context, odigosns string)

func CreateNewDestination

func CreateNewDestination(c *gin.Context, odigosns string)

func DeleteDestination

func DeleteDestination(c *gin.Context, odigosns string)

func DeleteInstrumentationRule

func DeleteInstrumentationRule(c *gin.Context, odigosns string, ruleId string)

func DeleteSource

func DeleteSource(c *gin.Context)

func DescribeSource

func DescribeSource(c *gin.Context, ns string, kind string, name string)

func GetApplicationsInNamespace

func GetApplicationsInNamespace(c *gin.Context)

func GetConfig

func GetConfig(c *gin.Context)

func GetCurrentOdigosTier

func GetCurrentOdigosTier(ctx context.Context, client *kube.Client, ns string) (common.OdigosTier, error)

func GetDestinationById

func GetDestinationById(c *gin.Context, odigosns string)

func GetDestinationTypeDetails

func GetDestinationTypeDetails(c *gin.Context)

func GetDestinationTypes

func GetDestinationTypes(c *gin.Context)

func GetDestinations

func GetDestinations(c *gin.Context, odigosns string)

func GetDestinationsMetrics

func GetDestinationsMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer)

func GetImageURL

func GetImageURL(image string) string

func GetInstrumentationRule

func GetInstrumentationRule(c *gin.Context, odigosns string, ruleId string)

func GetInstrumentationRules

func GetInstrumentationRules(c *gin.Context, odigosns string)

func GetNamespaces

func GetNamespaces(c *gin.Context, odigosns string)

func GetSingleDestinationMetrics

func GetSingleDestinationMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer)

func GetSingleSourceMetrics

func GetSingleSourceMetrics(c *gin.Context, m *collectormetrics.OdigosMetricsConsumer)

func GetSource

func GetSource(c *gin.Context)

func GetSources

func GetSources(c *gin.Context, odigosns string)

func PatchSource

func PatchSource(c *gin.Context)

func PersistNamespaces

func PersistNamespaces(c *gin.Context)

func TestConnectionForDestination

func TestConnectionForDestination(c *gin.Context, odigosns string)

func UpdateExistingDestination

func UpdateExistingDestination(c *gin.Context, odigosns string)

func UpdateInstrumentationRule

func UpdateInstrumentationRule(c *gin.Context, odigosns string, ruleId string)

Types

type Destination

type Destination struct {
	Id              string                       `json:"id"`
	Name            string                       `json:"name"`
	Type            common.DestinationType       `json:"type"`
	ExportedSignals ExportedSignals              `json:"signals"`
	Fields          map[string]string            `json:"fields"`
	DestinationType DestinationTypesCategoryItem `json:"destination_type"`
	Conditions      []metav1.Condition           `json:"conditions,omitempty"`
}

func (Destination) GetConfig

func (dest Destination) GetConfig() map[string]string

func (Destination) GetID

func (dest Destination) GetID() string

func (Destination) GetSignals

func (dest Destination) GetSignals() []common.ObservabilitySignal

func (Destination) GetType

func (dest Destination) GetType() common.DestinationType

type DestinationTypesCategoryItem

type DestinationTypesCategoryItem struct {
	Type                    common.DestinationType `json:"type"`
	DisplayName             string                 `json:"display_name"`
	ImageUrl                string                 `json:"image_url"`
	SupportedSignals        SupportedSignals       `json:"supported_signals"`
	TestConnectionSupported bool                   `json:"test_connection_supported"`
}

func DestinationTypeConfigToCategoryItem

func DestinationTypeConfigToCategoryItem(destConfig destinations.Destination) DestinationTypesCategoryItem

type DestinationsCategory

type DestinationsCategory struct {
	Name  string                         `json:"name"`
	Items []DestinationTypesCategoryItem `json:"items"`
}

type ExportedSignals

type ExportedSignals struct {
	Traces  bool `json:"traces"`
	Metrics bool `json:"metrics"`
	Logs    bool `json:"logs"`
}

type Field

type Field struct {
	Name                string                 `json:"name"`
	DisplayName         string                 `json:"display_name"`
	ComponentType       string                 `json:"component_type"`
	ComponentProperties map[string]interface{} `json:"component_properties"`
	VideoUrl            string                 `json:"video_url,omitempty"`
	ThumbnailURL        string                 `json:"thumbnail_url,omitempty"`
	InitialValue        string                 `json:"initial_value,omitempty"`
}

type GetApplicationItem

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

type GetApplicationItemInNamespace

type GetApplicationItemInNamespace struct {
	Name                      string       `json:"name"`
	Kind                      WorkloadKind `json:"kind"`
	Instances                 int          `json:"instances"`
	AppInstrumentationLabeled *bool        `json:"app_instrumentation_labeled"`
	NsInstrumentationLabeled  *bool        `json:"ns_instrumentation_labeled"`
	InstrumentationEffective  bool         `json:"instrumentation_effective"`
}

type GetApplicationsInNamespaceRequest

type GetApplicationsInNamespaceRequest struct {
	Namespace string `uri:"namespace" binding:"required"`
}

type GetApplicationsInNamespaceResponse

type GetApplicationsInNamespaceResponse struct {
	Applications []GetApplicationItemInNamespace `json:"applications"`
}

type GetConfigResponse

type GetConfigResponse struct {
	Installation InstallationStatus `json:"installation"`
}

type GetDestinationDetailsResponse

type GetDestinationDetailsResponse struct {
	Fields []Field `json:"fields"`
}

type GetDestinationTypesResponse

type GetDestinationTypesResponse struct {
	Categories []DestinationsCategory `json:"categories"`
}

type GetNamespaceItem

type GetNamespaceItem struct {
	Name      string `json:"name"`
	Selected  bool   `json:"selected"`
	TotalApps int    `json:"totalApps"`
}

type GetNamespacesResponse

type GetNamespacesResponse struct {
	Namespaces []GetNamespaceItem `json:"namespaces"`
}

type InstallationStatus

type InstallationStatus string
const (
	NewInstallation InstallationStatus = "NEW"
	AppsSelected    InstallationStatus = "APPS_SELECTED"
	Finished        InstallationStatus = "FINISHED"
)

type InstrumentationRule

type InstrumentationRule struct {
	odigosv1alpha1.InstrumentationRuleSpec

	// how the rule can be referenced in the REST api.
	// this is the name of the CR in k8s
	RuleId string `json:"ruleId"`
}

This type is used to hide the details of the k8s manifest and expose a generic object

type InstrumentedApplicationDetails

type InstrumentedApplicationDetails struct {
	Languages              []SourceLanguage                         `json:"languages,omitempty"`
	Conditions             []metav1.Condition                       `json:"conditions,omitempty"`
	InstrumentationOptions []v1alpha1.WorkloadInstrumentationConfig `json:"instrumentation_options,omitempty"`
}

type ObservabilitySignalSupport

type ObservabilitySignalSupport struct {
	Supported bool `json:"supported"`
}

type PatchSourceRequest

type PatchSourceRequest struct {
	ReportedName          *string                                  `json:"reported_name"`
	InstrumentationConfig []v1alpha1.WorkloadInstrumentationConfig `json:"instrumentation_config,omitempty"`
}

type PersistNamespaceItem

type PersistNamespaceItem struct {
	Name           string                   `json:"name"`
	SelectedAll    bool                     `json:"selected_all"`
	FutureSelected *bool                    `json:"future_selected,omitempty"`
	Objects        []PersistNamespaceObject `json:"objects"`
}

type PersistNamespaceObject

type PersistNamespaceObject struct {
	Name     string       `json:"name"`
	Kind     WorkloadKind `json:"kind"`
	Selected *bool        `json:"selected,omitempty"`
}

type Source

type Source struct {
	ThinSource
	ReportedName          string                                   `json:"reported_name,omitempty"`
	InstrumentationConfig []v1alpha1.WorkloadInstrumentationConfig `json:"instrumentation_config,omitempty"`
}

type SourceLanguage

type SourceLanguage struct {
	ContainerName  string `json:"container_name"`
	Language       string `json:"language"`
	RuntimeVersion string `json:"runtime_version,omitempty"`
}

type SupportedSignals

type SupportedSignals struct {
	Traces  ObservabilitySignalSupport `json:"traces"`
	Metrics ObservabilitySignalSupport `json:"metrics"`
	Logs    ObservabilitySignalSupport `json:"logs"`
}

type ThinSource

type ThinSource struct {
	common.SourceID
	NumberOfRunningInstances int                             `json:"number_of_running_instances"`
	IaDetails                *InstrumentedApplicationDetails `json:"instrumented_application_details"`
}

this object contains only part of the source fields. It is used to display the sources in the frontend

type WorkloadKind

type WorkloadKind string
const (
	WorkloadKindDeployment  WorkloadKind = "Deployment"
	WorkloadKindStatefulSet WorkloadKind = "StatefulSet"
	WorkloadKindDaemonSet   WorkloadKind = "DaemonSet"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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