cloudfoundry

package
v0.0.0-...-ff51d6a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokenFetcher

type AuthTokenFetcher interface {
	FetchAuthToken() string
}

AuthTokenFetcher is an interface for fetching an auth token from uaa

type CFApplication

type CFApplication struct {
	GUID           string
	Name           string
	SpaceGUID      string
	SpaceName      string
	OrgName        string
	OrgGUID        string
	Instances      int
	Buildpacks     []string
	DiskQuota      int
	TotalDiskQuota int
	Memory         int
	TotalMemory    int
	Labels         map[string]string
	Annotations    map[string]string
	Sidecars       []CFSidecar
}

CFApplication represents a Cloud Controller Application.

type CFClient

type CFClient struct {
	ApiVersion int
	NumWorkers int
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *config.Config, logger *gosteno.Logger) (*CFClient, error)

func (*CFClient) GetApplication

func (cfc *CFClient) GetApplication(guid string) (*CFApplication, error)

func (*CFClient) GetApplications

func (cfc *CFClient) GetApplications() ([]CFApplication, error)

func (*CFClient) GetDopplerEndpoint

func (cfc *CFClient) GetDopplerEndpoint() string

func (*CFClient) GetV2OrgQuotas

func (cfc *CFClient) GetV2OrgQuotas() ([]CFOrgQuota, error)

func (*CFClient) GetV2Orgs

func (cfc *CFClient) GetV2Orgs() ([]cfclient.Org, error)

func (*CFClient) GetV3Orgs

func (cfc *CFClient) GetV3Orgs() ([]cfclient.V3Organization, error)

type CFOrgQuota

type CFOrgQuota struct {
	GUID        string
	MemoryLimit int
}

type CFSidecar

type CFSidecar struct {
	Name string
	GUID string
}

type DCAClient

type DCAClient struct {
	ClusterAgentVersion Version // Version of the cluster-agent we're connected to
	// contains filtered or unexported fields
}

DCAClient is required to query the API of Datadog cluster agent

func NewDCAClient

func NewDCAClient(config *config.Config, logger *gosteno.Logger) (*DCAClient, error)

func (*DCAClient) GetApplication

func (c *DCAClient) GetApplication(appGUID string) (*CFApplication, error)

GetApplication fetches a CF Application with the given appGUID from the Cluster Agent.

func (*DCAClient) GetApplications

func (c *DCAClient) GetApplications() ([]CFApplication, error)

GetApplications fetches the list of CF Applications from the Cluster Agent.

func (*DCAClient) GetV2OrgQuotas

func (c *DCAClient) GetV2OrgQuotas() ([]CFOrgQuota, error)

GetV2OrgQuotas fetches CF Organization Quotas from the Cluster Agent.

func (*DCAClient) GetV3Orgs

func (c *DCAClient) GetV3Orgs() ([]cfclient.V3Organization, error)

// GetV3Orgs fetches a V3 CF Organizations from the Cluster Agent.

func (*DCAClient) GetVersion

func (c *DCAClient) GetVersion() (Version, error)

GetVersion fetches the version of the Cluster Agent.

func (*DCAClient) V2OrgsFromV3Orgs

func (c *DCAClient) V2OrgsFromV3Orgs() ([]cfclient.Org, error)

V2OrgsFromV3Orgs

func (*DCAClient) Version

func (c *DCAClient) Version() Version

Version returns ClusterAgentVersion already stored in the DCAClient

type Data

type Data struct {
	Data struct {
		GUID string `json:"guid"`
	} `json:"data"`
}

type LoggregatorClient

type LoggregatorClient struct {
	RLPGatewayClient *loggregator.RLPGatewayClient
	// contains filtered or unexported fields
}

func NewLoggregatorClient

func NewLoggregatorClient(cfg *config.Config, lgr *gosteno.Logger, authTokenFetcher AuthTokenFetcher) (*LoggregatorClient, error)

func (*LoggregatorClient) EnvelopeStream

func (l *LoggregatorClient) EnvelopeStream() loggregator.EnvelopeStream

func (*LoggregatorClient) Stop

func (l *LoggregatorClient) Stop()

type Version

type Version struct {
	Major  int64
	Minor  int64
	Patch  int64
	Pre    string
	Meta   string
	Commit string
}

func (*Version) GetNumber

func (v *Version) GetNumber() string

GetNumber returns a string containing version numbers only, e.g. `0.0.0`

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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