cfapps

package
v2.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppName             = cfg.GetString(config.EnvAppName)
	AppSpaceName        = cfg.GetString(config.EnvAppSpaceName)
	AppOrgName          = cfg.GetString(config.EnvAppOrgName)
	AppID               = cfg.GetString(config.EnvAppID)
	AppInstanceIndex    = cfg.GetString(config.EnvAppInstanceIndex)
	AppInstanceState    = cfg.GetString(config.EnvAppInstanceState)
	AppInstanceUID      = cfg.GetString(config.EnvAppInstanceUID)
	AppInstancesDesired = cfg.GetString(config.EnvAppInstancesDesired)
)

nolint

Functions

func NewSummary

func NewSummary() *attributes.Attributes

NewSummary ...

Types

type CFApp

type CFApp struct {
	Attributes   *attributes.Attributes
	GUID         string
	App          *cfclient.App
	Summaries    map[int32]string
	VcapServices map[string]interface{}
	LastPull     time.Time
	Lock         *sync.RWMutex
	// contains filtered or unexported fields
}

CFApp Extended

func NewCFApp

func NewCFApp(guid string) *CFApp

NewCFApp ...

func (*CFApp) GetAppEnv

func (a *CFApp) GetAppEnv()

GetAppEnv calls the client to get the system environment. This is added to the pcfapp and consumed by applicaton specific accumulators (ContainerMetric and LogMessage)

func (*CFApp) GetInstanceAttributes

func (a *CFApp) GetInstanceAttributes(id int32) (attrs *attributes.Attributes)

GetInstanceAttributes ...

func (*CFApp) UpdateInstances

func (a *CFApp) UpdateInstances()

UpdateInstances ...

type CFAppManager

type CFAppManager struct {
	Cache *Cache
	// contains filtered or unexported fields
}

CFAppManager ...

func GetInstance

func GetInstance() *CFAppManager

GetInstance gets singleton of CFAppManager

func Start

func Start(app *app.Application) *CFAppManager

Start CFAppManager

func (*CFAppManager) Close

func (c *CFAppManager) Close()

Close CFAppManager

func (*CFAppManager) FetchApp

func (c *CFAppManager) FetchApp(a *CFApp) error

FetchApp ...

func (*CFAppManager) GetApp

func (c *CFAppManager) GetApp(guid string) (app *CFApp)

GetApp ...

func (*CFAppManager) GetAppEnv

func (c *CFAppManager) GetAppEnv(guid string) (cfclient.AppEnv, error)

GetAppEnv ...

func (*CFAppManager) GetAppInstanceAttributes

func (c *CFAppManager) GetAppInstanceAttributes(appID string, instanceID int32) (attrs *attributes.Attributes)

GetAppInstanceAttributes ...

func (*CFAppManager) GetAppInstances

func (c *CFAppManager) GetAppInstances(guid string) (map[string]cfclient.AppInstance, error)

GetAppInstances ...

func (*CFAppManager) UpdateClient

func (c *CFAppManager) UpdateClient()

UpdateClient when the token expires we need a fresh client

type Cache

type Cache struct {
	Collection  map[string]*CFApp
	WriteBuffer chan *CFApp
	// contains filtered or unexported fields
}

Cache ...

func NewCache

func NewCache() *Cache

NewCache ...

func (*Cache) Get

func (c *Cache) Get(id string) (app *CFApp, found bool)

Get ...

func (*Cache) Put

func (c *Cache) Put(app *CFApp)

Put ...

func (*Cache) Start

func (c *Cache) Start()

Start ...

type Error

type Error string

Error ...

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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