-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add minio client #693
Add minio client #693
Conversation
@@ -56,5 +56,4 @@ type Store interface { | |||
Lister | |||
Closer | |||
NewReader(ctx context.Context, path string) (io.ReadCloser, error) | |||
NewWriter(ctx context.Context, path string) io.WriteCloser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewWriter
is unused by anywhere, so got rid of it.
Code coverage for golang is
|
pkg/app/api/cmd/server/server.go
Outdated
@@ -145,12 +145,12 @@ func (s *server) run(ctx context.Context, t cli.Telemetry) error { | |||
|
|||
fs, err := s.createFilestore(ctx, cfg, t.Logger) | |||
if err != nil { | |||
t.Logger.Error("failed creating firestore", zap.Error(err)) | |||
t.Logger.Error("failed creating filestore", zap.Error(err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"failed to create ..."
pkg/app/api/cmd/server/server.go
Outdated
return err | ||
} | ||
defer func() { | ||
if err := fs.Close(); err != nil { | ||
t.Logger.Error("failed closing firestore client", zap.Error(err)) | ||
t.Logger.Error("failed closing filestore client", zap.Error(err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"failed to close ..."
pkg/filestore/minio/minio.go
Outdated
} | ||
|
||
func (s *Store) ListObjects(ctx context.Context, prefix string) ([]filestore.Object, error) { | ||
return nil, nil | ||
objectsCh := s.client.ListObjects(ctx, s.bucket, minio.ListObjectsOptions{Prefix: prefix, Recursive: true}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objectCh
/approve |
What this PR does / why we need it:
This PR lets us utilize minio as a filestore.
Which issue(s) this PR fixes:
Fixes #35
Does this PR introduce a user-facing change?: