Documentation ¶
Index ¶
Constants ¶
const (
APP_BUCKET = "AppBucket"
)
Variables ¶
var (
ErrMissingAndIgnored = errors.New("App was missing from the in-memory cache and ignored")
)
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Name string Guid string SpaceName string SpaceGuid string OrgName string OrgGuid string CfAppEnv map[string]interface{} IgnoredApp bool }
func (App) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (App) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*App) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*App) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type AppClient ¶
type AppClient interface { AppByGuid(appGuid string) (cfclient.App, error) ListApps() ([]cfclient.App, error) ListAppsByQueryWithLimits(query url.Values, totalPages int) ([]cfclient.App, error) GetSpaceByGuid(spaceGUID string) (cfclient.Space, error) GetOrgByGuid(orgGUID string) (cfclient.Org, error) }
type Boltdb ¶
type Boltdb struct {
// contains filtered or unexported fields
}
func (*Boltdb) GetAllApps ¶
GetAllApps returns all apps info
func (*Boltdb) GetApp ¶
GetApp tries to retrieve the app info from in-memory cache. If it finds the app then it returns. If the app is added to missing app cache then it will return ErrMissingAndIgnored. If the app is not found in in-memory cache and missing app cache, it'll make an API request to retrieve the app info from remote. If found, the app will be added to the cache and returns. If not found on remote, it'll try to retrieve from boltdb databse. If found, returns. If not found and IgnoreMissingApps congig is enabled, the app will be added to missingApps cache.
func (*Boltdb) ManuallyInvalidateCaches ¶ added in v1.3.0
type BoltdbConfig ¶
type Cache ¶
type Cache interface { Open() error Close() error GetAllApps() (map[string]*App, error) GetApp(string) (*App, error) }
func NewNoCache ¶
func NewNoCache() Cache