MCPcopy
hub / github.com/feast-dev/feast / Teardown

Method Teardown

go/internal/feast/registry/s3.go:83–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81}
82
83func (r *S3RegistryStore) Teardown() error {
84 bucket, key, err := r.parseS3Path()
85 if err != nil {
86 return err
87 }
88 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
89 defer cancel()
90 _, err = r.s3Client.DeleteObject(ctx,
91 &s3.DeleteObjectInput{
92 Bucket: aws.String(bucket),
93 Key: aws.String(key),
94 })
95 if err != nil {
96 panic(err)
97 }
98 return nil
99}
100
101func (r *S3RegistryStore) parseS3Path() (string, string, error) {
102 path := strings.TrimPrefix(r.filePath, "s3://")

Callers

nothing calls this directly

Calls 2

parseS3PathMethod · 0.95
DeleteObjectMethod · 0.65

Tested by

no test coverage detected