cloudfoundry

package
v0.0.0-...-44638ef Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerNameTagKey tag key for container tags
	ContainerNameTagKey = "container_name"
	// AppInstanceGUIDTagKey tag key for container tags
	AppInstanceGUIDTagKey = "app_instance_guid"
	// AppNameTagKey tag key for container tags
	AppNameTagKey = "app_name"
	// AppInstanceIndexTagKey tag key for container tags
	AppInstanceIndexTagKey = "app_instance_index"
	// AppGUIDTagKey tag key for container tags
	AppGUIDTagKey = "app_guid"
	// AppIDTagKey tag key for container tags. We carry both app_guid and app_id; this is because
	// we added app_guid initially here, but then we added space_id and org_id that have just "_id"
	// to be consistent with https://github.com/DataDog/datadog-firehose-nozzle; therefore we now
	// also include "app_id" to have a consistent set of tags that end with "_id".
	AppIDTagKey = "app_id"
	// OrgIDTagKey tag key for container tags
	// NOTE: we use "org_*" instead of "organization_* to have the tags consistent with
	// tags attached by https://github.com/DataDog/datadog-firehose-nozzle
	OrgIDTagKey = "org_id"
	// OrgNameTagKey tag key for container tags
	OrgNameTagKey = "org_name"
	// SpaceIDTagKey tag key for container tags
	SpaceIDTagKey = "space_id"
	// SpaceNameTagKey tag key for container tags
	SpaceNameTagKey = "space_name"
)

Variables

This section is empty.

Functions

func GetHostAliases

func GetHostAliases(ctx context.Context) ([]string, error)

GetHostAliases returns the host aliases from Cloud Foundry

Types

type GardenUtil

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

GardenUtil wraps interactions with a local garden API.

func GetGardenUtil

func GetGardenUtil() (*GardenUtil, error)

GetGardenUtil returns the global instance of the garden utility and initializes it first if needed

func (*GardenUtil) GetGardenContainers

func (gu *GardenUtil) GetGardenContainers() ([]garden.Container, error)

GetGardenContainers returns the list of running containers from the local garden API

func (*GardenUtil) ListContainers

func (gu *GardenUtil) ListContainers() ([]*containers.Container, error)

ListContainers returns the list of running containers and populates their metrics and metadata

func (*GardenUtil) UpdateContainerMetrics

func (gu *GardenUtil) UpdateContainerMetrics(cList []*containers.Container) error

UpdateContainerMetrics updates the metric for a list of containers

type GardenUtilInterface

type GardenUtilInterface interface {
	GetGardenContainers() ([]garden.Container, error)
	ListContainers() ([]*containers.Container, error)
	UpdateContainerMetrics(cList []*containers.Container) error
}

GardenUtilInterface describes a wrapper for collecting local garden containers

Jump to

Keyboard shortcuts

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