Documentation ¶
Index ¶
- type ProviderConfigReader
- type ResourceFetcher
- type Service
- func (s *Service) LoadCachedProviderArgOptions(ctx context.Context, providerId string, argId string) (bool, []cache.ProviderOption, []cache.ProviderArgGroupOption, error)
- func (s *Service) RefreshCachedProviderArgOptions(ctx context.Context, providerId string, argId string) (bool, []cache.ProviderOption, []cache.ProviderArgGroupOption, error)
- func (s *Service) RefreshCachedTargetGroupResources(ctx context.Context, tg target.Group) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderConfigReader ¶
type ProviderConfigReader interface {
ReadProviders(ctx context.Context) (deploy.ProviderMap, error)
}
type ResourceFetcher ¶ added in v0.15.0
type ResourceFetcher struct {
// contains filtered or unexported fields
}
ResourceFetcher fetches resources from provider lambda handler based on provider schema's "loadResources" object.
func NewResourceFetcher ¶ added in v0.15.0
func NewResourceFetcher(targetGroupID string, runtime *handlerclient.Client) *ResourceFetcher
func (*ResourceFetcher) LoadResources ¶ added in v0.15.0
func (rf *ResourceFetcher) LoadResources(ctx context.Context, tasks []string) ([]cache.TargateGroupResource, error)
LoadResources invokes the deployment
type Service ¶
type Service struct { DB ddb.Storage AccessHandlerClient ahtypes.ClientWithResponsesInterface ProviderConfigReader ProviderConfigReader RequestRouter *requestroutersvc.Service }
Service holds business logic relating to Access Requests.
func (*Service) LoadCachedProviderArgOptions ¶
func (s *Service) LoadCachedProviderArgOptions(ctx context.Context, providerId string, argId string) (bool, []cache.ProviderOption, []cache.ProviderArgGroupOption, error)
loadCachedProviderArgOptions handles the case where we fetch arg options from the DynamoDB cache. If cached options aren't present it falls back to refetching options from the Access Handler. If options are refetched, the cache is updated.
func (*Service) RefreshCachedProviderArgOptions ¶
func (s *Service) RefreshCachedProviderArgOptions(ctx context.Context, providerId string, argId string) (bool, []cache.ProviderOption, []cache.ProviderArgGroupOption, error)
refreshProviderArgOptions deletes any cached options and then refetches them from the Access Handler. It updates the cached options. To prevent an extended period of time where options are unavailable, we only update the items, and delete any that are no longer present (fixes SOL-35) return true if options were refetched, false if they were already cached
func (*Service) RefreshCachedTargetGroupResources ¶ added in v0.15.0
RefreshCachedTargetGroupResources deletes any cached options and then refetches them from the available deployment. It updates the cached options. To prevent an extended period of time where options are unavailable, we only update the items, and delete any that are no longer present (fixes SOL-35) return true if options were refetched, false if they were already cached