Documentation
¶
Overview ¶
Code generated by generate-cached. DO NOT EDIT.
Index ¶
- type AwsClient
- type Function
- type LambdaRepository
- func (r *LambdaRepository) GetRegion() ptypes.AwsRegion
- func (r *LambdaRepository) ListFunctionTags(fn types.FunctionConfiguration) (map[string]string, error)
- func (r *LambdaRepository) ListFunctionsAll() ([]Function, error)
- func (r *LambdaRepository) ListFunctionsByInput(query *awslambda.ListFunctionsInput) ([]Function, error)
- func (r *LambdaRepository) WithCache(dc *cache.DataCache) *LambdaRepositoryCached
- type LambdaRepositoryCached
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsClient ¶
type AwsClient interface {
GetRegion() ptypes.AwsRegion
GetAccountID() ptypes.AwsAccountID
}
type Function ¶
type Function struct {
service.AbstractResource
types2.FunctionConfiguration
Tags map[string]string
}
func NewFunction ¶
func (Function) GetTagValue ¶
type LambdaRepository ¶
type LambdaRepository struct {
// contains filtered or unexported fields
}
func NewLambdaRepository ¶
func NewLambdaRepository(ctx context.Context, client *v3.Client) *LambdaRepository
func (*LambdaRepository) GetRegion ¶
func (r *LambdaRepository) GetRegion() ptypes.AwsRegion
func (*LambdaRepository) ListFunctionTags ¶
func (r *LambdaRepository) ListFunctionTags(fn types.FunctionConfiguration) (map[string]string, error)
func (*LambdaRepository) ListFunctionsAll ¶
func (r *LambdaRepository) ListFunctionsAll() ([]Function, error)
func (*LambdaRepository) ListFunctionsByInput ¶
func (r *LambdaRepository) ListFunctionsByInput(query *awslambda.ListFunctionsInput) ([]Function, error)
func (*LambdaRepository) WithCache ¶ added in v0.4.0
func (r *LambdaRepository) WithCache(dc *cache.DataCache) *LambdaRepositoryCached
WithCache returns a LambdaRepositoryCached that stores/retrieves results via the given DataCache. The cache namespace is set to "<accountID>:<region>:lambda".
The service name is part of the namespace because cache.Key renders a parameterless call as the bare method name, and several services expose the same one: ListClustersAll on ecs/eks/emr, ListTablesAll on dynamodb/glue. Sharing a namespace makes those repositories overwrite each other's entries, so every read decodes another service's payload, fails, and refetches from AWS.
type LambdaRepositoryCached ¶ added in v0.4.0
type LambdaRepositoryCached struct {
// contains filtered or unexported fields
}
LambdaRepositoryCached wraps LambdaRepository and caches results of Get*/List* calls.
func (*LambdaRepositoryCached) ListFunctionTags ¶ added in v0.4.0
func (c *LambdaRepositoryCached) ListFunctionTags(fn types2.FunctionConfiguration) (map[string]string, error)
ListFunctionTags returns cached results when available, otherwise delegates to the underlying repository.
func (*LambdaRepositoryCached) ListFunctionsAll ¶ added in v0.4.0
func (c *LambdaRepositoryCached) ListFunctionsAll() ([]Function, error)
ListFunctionsAll returns cached results when available, otherwise delegates to the underlying repository.
func (*LambdaRepositoryCached) ListFunctionsByInput ¶ added in v0.4.0
func (c *LambdaRepositoryCached) ListFunctionsByInput(query *awslambda.ListFunctionsInput) ([]Function, error)
ListFunctionsByInput returns cached results when available, otherwise delegates to the underlying repository.