Documentation
¶
Index ¶
- type AppInstance
- type AppMeta
- type Output
- type Seeker
- func (s *Seeker) BOSHConfigured() bool
- func (s *Seeker) ByGUID(appGUID string) (string, error)
- func (s *Seeker) ByOrgSpaceAndName(org, space, app string) (retGUID string, err error)
- func (s *Seeker) FindInstances(guid string, inputErr error) (meta *AppMeta, inst []AppInstance, err error)
- func (s *Seeker) GetVMWithIP(ip string) (vm *VMInfo, err error)
- func (s *Seeker) InvalidateAll()
- func (s *Seeker) SetTTL(ttl time.Duration)
- type VMCache
- type VMInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInstance ¶ added in v0.2.0
AppInstance has information from the CF API about an application
type AppMeta ¶ added in v0.2.0
AppMeta has information about the pushed application itself, universal to all its instances
type Output ¶ added in v1.1.0
Output is an output struct that knows how to take json and turn it into the fields of itself
type Seeker ¶
Seeker has constructs and functions necessary to find app locations in Cloud Foundry
func NewSeeker ¶
NewSeeker returns a NewSeeker with a client configured with the information in the given Config object
func (*Seeker) BOSHConfigured ¶ added in v0.3.0
BOSHConfigured returns true if the attached configuration has all the keys required to attempt a connection to BOSH. False otherwise.
func (*Seeker) ByGUID ¶
ByGUID checks that the given appGUID is set, returning an error if not, and then passes through the given GUID, dereferenced.
func (*Seeker) ByOrgSpaceAndName ¶
ByOrgSpaceAndName checks that the given variables are set, erroring if any of them are not, and then looks up the GUID of the app using the CF API.
func (*Seeker) FindInstances ¶ added in v0.2.0
func (s *Seeker) FindInstances(guid string, inputErr error) (meta *AppMeta, inst []AppInstance, err error)
FindInstances takes the App GUID given and queries the CF API to get the IP addresses of the VMs and listening ports on which the instances of the application are located and returns those. If inputErr is non-nil, the function will bail early with the given error.
func (*Seeker) GetVMWithIP ¶
GetVMWithIP searches the BOSH director for the VM with the IP you've given An error is returned if a problem is encountered while contacting the BOSH director. If the VM simply could not be found in the configured deployments, no error is returned, but vm will be nil.
func (*Seeker) InvalidateAll ¶ added in v0.2.0
func (s *Seeker) InvalidateAll()
InvalidateAll wipes the entire cache