collector

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const CfAppsMetadataKind types.Kind = "CfApps"

CfAppsMetadataKind defines kind of cf runtime instance apps file

View Source
const CfCollectAppsMetadataKind types.Kind = "CfCollectApps"

CfCollectAppsMetadataKind defines kind of cf collect apps file

Variables

This section is empty.

Functions

This section is empty.

Types

type App added in v0.3.8

type App struct {
	Guid                     string                     `json:"guid"`
	CreatedAt                string                     `json:"created_at"`
	UpdatedAt                string                     `json:"updated_at"`
	Name                     string                     `json:"name"`
	Memory                   int                        `json:"memory"`
	Instances                int                        `json:"instances"`
	DiskQuota                int                        `json:"disk_quota"`
	SpaceGuid                string                     `json:"space_guid"`
	StackGuid                string                     `json:"stack_guid"`
	State                    string                     `json:"state"`
	PackageState             string                     `json:"package_state"`
	Command                  string                     `json:"command"`
	Buildpack                string                     `json:"buildpack"`
	DetectedBuildpack        string                     `json:"detected_buildpack"`
	DetectedBuildpackGuid    string                     `json:"detected_buildpack_guid"`
	HealthCheckHttpEndpoint  string                     `json:"health_check_http_endpoint"`
	HealthCheckType          string                     `json:"health_check_type"`
	HealthCheckTimeout       int                        `json:"health_check_timeout"`
	Diego                    bool                       `json:"diego"`
	EnableSSH                bool                       `json:"enable_ssh"`
	DetectedStartCommand     string                     `json:"detected_start_command"`
	DockerImage              string                     `json:"docker_image"`
	DockerCredentialsJSON    map[string]interface{}     `json:"docker_credentials_json"`
	DockerCredentials        cfclient.DockerCredentials `json:"docker_credentials"`
	Environment              map[string]interface{}     `json:"environment_json"`
	StagingFailedReason      string                     `json:"staging_failed_reason"`
	StagingFailedDescription string                     `json:"staging_failed_description"`
	Ports                    []int                      `json:"ports"`
	SpaceURL                 string                     `json:"space_url"`
	SpaceData                cfclient.SpaceResource     `json:"space"`
	PackageUpdatedAt         string                     `json:"package_updated_at"`
	// contains filtered or unexported fields
}

App defines CF application information

type AppResource added in v0.3.8

type AppResource struct {
	Meta   cfclient.Meta `json:"metadata"`
	Entity App           `json:"entity"`
}

AppResource defines app resource

type AppResponse added in v0.3.8

type AppResponse struct {
	Count     int           `json:"total_results"`
	Pages     int           `json:"total_pages"`
	NextUrl   string        `json:"next_url"`
	Resources []AppResource `json:"resources"`
}

AppResponse defines app response

type CfApp added in v0.3.8

type CfApp struct {
	Application App             `yaml:"application"`
	Environment cfclient.AppEnv `yaml:"environment"`
}

CfApp defines CfApp and environment information

type CfAppSpec added in v0.3.8

type CfAppSpec struct {
	Name string `json:"name"`
	Guid string `json:"guid"`
}

CfAppSpec defines CF app spec

type CfApps added in v0.3.8

type CfApps struct {
	types.TypeMeta   `yaml:",inline"`
	types.ObjectMeta `yaml:"metadata,omitempty"`
	Spec             CfAppsSpec `yaml:"spec,omitempty"`
}

CfApps defines definition of cf runtime instance apps file

func FormatMapsWithInterface added in v0.3.8

func FormatMapsWithInterface(cfAppInstances CfApps) CfApps

FormatMapsWithInterface stringifies interfaces in cloud foundry data

func NewCfApps added in v0.3.8

func NewCfApps() CfApps

NewCfApps creates a new instance of CfInstanceApps

type CfAppsCollector

type CfAppsCollector struct {
}

CfAppsCollector collects cf runtime applications

func (*CfAppsCollector) Collect

func (c *CfAppsCollector) Collect(inputPath string, outputPath string) error

Collect gets the cf app metadata by querying the cf app. Assumes that the authentication with cluster is already done.

func (*CfAppsCollector) GetAnnotations

func (c *CfAppsCollector) GetAnnotations() []string

GetAnnotations returns annotations on which this collector should be invoked

type CfAppsSpec added in v0.3.8

type CfAppsSpec struct {
	CfApps []CfApp `yaml:"applications"`
}

CfAppsSpec stores the data

type CfCollectApp added in v0.3.8

type CfCollectApp struct {
	AppSpec CfAppSpec `yaml:"application"`
}

CfCollectApp defines CfCollectApp information

type CfCollectApps added in v0.3.8

type CfCollectApps struct {
	types.TypeMeta `yaml:",inline"`
	Spec           CfCollectAppsSpec `yaml:"spec,omitempty"`
}

CfCollectApps defines definition of cf collect apps file

type CfCollectAppsSpec added in v0.3.8

type CfCollectAppsSpec struct {
	Filters       CfCollectFilters `yaml:"filters,omitempty"`
	CfCollectApps []CfCollectApp   `yaml:"applications,omitempty"`
}

CfCollectAppsSpec stores the app information

type CfCollectFilters added in v0.3.8

type CfCollectFilters struct {
	SpaceGuid  string `yaml:"spaceguid,omitempty"`
	QueryDepth string `yaml:"query_depth,omitempty"`
}

CfCollectFilters stores the spaceguid and querydepth to be used to filter while collecting metadata

type CfServicesCollector

type CfServicesCollector struct {
}

CfServicesCollector collects cf runtime applications

func (*CfServicesCollector) Collect

func (c *CfServicesCollector) Collect(inputPath string, outputPath string) error

Collect gets the cf service metadata by querying the cf app. Assumes that the authentication with cluster is already done.

func (*CfServicesCollector) GetAnnotations

func (c *CfServicesCollector) GetAnnotations() []string

GetAnnotations returns annotations on which this collector should be invoked

type ClusterCollector

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

ClusterCollector Implements Collector interface

func (*ClusterCollector) Collect

func (c *ClusterCollector) Collect(inputPath string, outputPath string) error

Collect gets the cluster metadata by querying the cluster. Assumes that the authentication with cluster is already done.

func (ClusterCollector) GetAnnotations

func (c ClusterCollector) GetAnnotations() []string

GetAnnotations returns annotations on which this collector should be invoked

type Collector

type Collector interface {
	Collect(inputDirectory string, outputPath string) error
	GetAnnotations() []string
}

Collector defines interface for collecting data from data sources

func GetCollectors

func GetCollectors() ([]Collector, error)

GetCollectors returns different collectors

type ImagesCollector

type ImagesCollector struct {
}

ImagesCollector collects the docker images

func (*ImagesCollector) Collect

func (c *ImagesCollector) Collect(inputDirectory string, outputPath string) error

Collect gets the image metadata using docker inspect

func (ImagesCollector) GetAnnotations

func (c ImagesCollector) GetAnnotations() []string

GetAnnotations returns annotations on which this collector should be invoked

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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