scaler_utils

package
v0.0.0-...-dd752a8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TABLE_NAME = "AppDetail"
)

Functions

func CloseDB

func CloseDB()

func Delete

func Delete(appDetail AppDetail)

func DeleteAll

func DeleteAll() error

func InitDB

func InitDB(dbConnectionInfo string)

func Insert

func Insert(appDetail AppDetail)

func IsDBEnabled

func IsDBEnabled() bool

func Update

func Update(appDetail AppDetail)

Types

type AppDetail

type AppDetail struct {
	Target  string `db:"target"  json:"queue"`
	AppName string `db:"appname" json:"app"`
	Org     string `db:"org"     json:"org"`
	Space   string `db:"space"   json:"space"`
	Updated int64  `db:"updated" json:"-"`
}

func Get

func Get(target string) AppDetail

func Load

func Load() []AppDetail

type AppInstanceDetail

type AppInstanceDetail struct {
	Target        string
	AppName       string
	AppGuid       string
	Instances     int
	LastFetchTime int64
}

type VcapServiceTypeDefn

type VcapServiceTypeDefn struct {
	Name  string   `json:"name"`
	Label string   `json:"label"`
	Plan  string   `json:"plan"`
	Tags  []string `json:"tags"`

	Credentials struct {
		Name     string `json:"name"`
		Hostname string `json:"hostname"`
		Uri      string `json:"uri"`
		JdbcUrl  string `json:"jbdbcUrl"`
		Port     string `json:"port"`
		Password string `json:"password"`
		Username string `json:"username"`
	} `json:"credentials"`
}

type VcapServices

type VcapServices struct {
	MySqlServiceDefn []VcapServiceTypeDefn `json:"cleardb-n/a"`
}

EDIT the mongo db version based on actual vcap services output

if going with MongoDB

Jump to

Keyboard shortcuts

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