endpoints

package
v0.0.0-...-e1bd6cf Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 17 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 CreateNewDestination

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

func DeleteDestination

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

func DeleteSource

func DeleteSource(c *gin.Context)

func GetApplicationsInNamespace

func GetApplicationsInNamespace(c *gin.Context)

func GetConfig

func GetConfig(c *gin.Context)

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 GetImageURL

func GetImageURL(image string) string

func GetNamespaces

func GetNamespaces(c *gin.Context)

func GetSource

func GetSource(c *gin.Context)

func GetSources

func GetSources(c *gin.Context)

func IsSystemNamespace

func IsSystemNamespace(namespace string) bool

TODO: read this from the odigosconfig CRD

func PatchSource

func PatchSource(c *gin.Context)

func PersistNamespaces

func PersistNamespaces(c *gin.Context)

func UpdateExistingDestination

func UpdateExistingDestination(c *gin.Context, odigosns 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"`
}

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"`
}

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 {
	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 []GetApplicationItem `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 ObservabilitySignalSupport

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

type PatchSourceRequest

type PatchSourceRequest struct {
	ReportedName *string `json:"reported_name"`
}

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"`
}

type SourceLanguage

type SourceLanguage struct {
	ContainerName string `json:"container_name"`
	Language      string `json:"language"`
}

type SupportedSignals

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

type ThinSource

type ThinSource struct {

	// combination of namespace, kind and name is unique
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`

	Languages []SourceLanguage `json:"languages"`
}

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