Skip to content

Commit

Permalink
refactor(indexshipper): removes unnecessary seeker impl from index st…
Browse files Browse the repository at this point in the history
…orage client (#14802)
  • Loading branch information
owen-d authored Nov 6, 2024
1 parent 9e7d2f2 commit a90b74d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/storage/stores/shipper/indexshipper/storage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ const delimiter = "/"
type UserIndexClient interface {
ListUserFiles(ctx context.Context, tableName, userID string, bypassCache bool) ([]IndexFile, error)
GetUserFile(ctx context.Context, tableName, userID, fileName string) (io.ReadCloser, error)
PutUserFile(ctx context.Context, tableName, userID, fileName string, file io.ReadSeeker) error
PutUserFile(ctx context.Context, tableName, userID, fileName string, file io.Reader) error
DeleteUserFile(ctx context.Context, tableName, userID, fileName string) error
}

// CommonIndexClient allows doing operations on the object store for common index.
type CommonIndexClient interface {
ListFiles(ctx context.Context, tableName string, bypassCache bool) ([]IndexFile, []string, error)
GetFile(ctx context.Context, tableName, fileName string) (io.ReadCloser, error)
PutFile(ctx context.Context, tableName, fileName string, file io.ReadSeeker) error
PutFile(ctx context.Context, tableName, fileName string, file io.Reader) error
DeleteFile(ctx context.Context, tableName, fileName string) error
}

Expand Down Expand Up @@ -139,11 +139,11 @@ func (s *indexStorageClient) GetUserFile(ctx context.Context, tableName, userID,
return readCloser, err
}

func (s *indexStorageClient) PutFile(ctx context.Context, tableName, fileName string, file io.ReadSeeker) error {
func (s *indexStorageClient) PutFile(ctx context.Context, tableName, fileName string, file io.Reader) error {
return s.objectClient.PutObject(ctx, path.Join(tableName, fileName), file)
}

func (s *indexStorageClient) PutUserFile(ctx context.Context, tableName, userID, fileName string, file io.ReadSeeker) error {
func (s *indexStorageClient) PutUserFile(ctx context.Context, tableName, userID, fileName string, file io.Reader) error {
return s.objectClient.PutObject(ctx, path.Join(tableName, userID, fileName), file)
}

Expand Down

0 comments on commit a90b74d

Please sign in to comment.