mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-09 07:22:40 -04:00
config: Azure SNP tool can delete specific version from attestation API (#1863)
* client supports delete version * rename to new attestation / fetcher naming * add delete command to upload tool * test client delete * bazel update * use general client in attestation client * Update hack/configapi/cmd/delete.go Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com> * daniel feedback * unit test azure sev upload * Update hack/configapi/cmd/delete.go Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com> * add client integration test * new client cmds use apiObject --------- Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
This commit is contained in:
parent
315b6c2f01
commit
c446f36b0f
22 changed files with 549 additions and 228 deletions
|
@ -93,7 +93,7 @@ func (e InvalidationError) Unwrap() error {
|
|||
return e.inner
|
||||
}
|
||||
|
||||
// New creates a new Client.
|
||||
// New creates a new Client. Call CloseFunc when done with operations.
|
||||
func New(ctx context.Context, config Config) (*Client, CloseFunc, error) {
|
||||
config.SetsDefault()
|
||||
cfg, err := awsconfig.LoadDefaultConfig(ctx, awsconfig.WithRegion(config.Region))
|
||||
|
@ -114,12 +114,7 @@ func New(ctx context.Context, config Config) (*Client, CloseFunc, error) {
|
|||
cacheInvalidationWaitTimeout: config.CacheInvalidationWaitTimeout,
|
||||
bucketID: config.Bucket,
|
||||
}
|
||||
clientClose := func(ctx context.Context) error {
|
||||
// ensure that all keys are invalidated
|
||||
return client.Flush(ctx)
|
||||
}
|
||||
|
||||
return client, clientClose, nil
|
||||
return client, client.Flush, nil
|
||||
}
|
||||
|
||||
// Flush flushes the client by invalidating the CDN cache for modified keys.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue