utils

package
v1.4.1-0...-3bf76e9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2017 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoundApps

func GetBoundApps(db *sql.DB) []model.Service

GetBoundApps - Loads bound apps into memory from database

func IsAppHealthy

func IsAppHealthy(appInstances map[string]cfclient.AppInstance) bool

IsAppHealthy - determins if an app is currently in "RUNNING" state

func LoadCFConfig

func LoadCFConfig() *cfclient.Config

LoadCFConfig - Loads "cf-service" UPS config

func PickAppInstance

func PickAppInstance(appInstances map[string]cfclient.AppInstance) int

PickAppInstance - selects an app instance index

func ShouldProcess

func ShouldProcess(frequency int, lastProcessed string) bool

ShouldProcess - determines if chaos-galago should be run based on frequency and previous run

func ShouldRun

func ShouldRun(probability float64) bool

ShouldRun - determins of chaos should be run based on probability

func TimeNow

func TimeNow() string

TimeNow - Formatted current time

func UpdateLastProcessed

func UpdateLastProcessed(db *sql.DB, appID string, lastProcessed string) error

UpdateLastProcessed - writes the last processed time to service_bindings database

Types

This section is empty.

Jump to

Keyboard shortcuts

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