storj/pkg/miniogw/gateway-storj.go

335 lines
8.3 KiB
Go
Raw Normal View History

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
captplanet (#159) * captplanet I kind of went overboard this weekend. The major goal of this changeset is to provide an environment for local development where all of the various services can be easily run together. Developing on Storj v3 should be as easy as running a setup command and a run command! To do this, this changeset introduces a new tool called captplanet, which combines the powers of the Overlay Cache, the PointerDB, the PieceStore, Kademlia, the Minio Gateway, etc. Running 40 farmers and a heavy client inside the same process forced a rethinking of the "services" that we had. To avoid confusion by reusing prior terms, this changeset introduces two new types: Providers and Responsibilities. I wanted to avoid as many merge conflicts as possible, so I left the existing Services and code for now, but if people like this route we can clean up the duplication. A Responsibility is a collection of gRPC methods and corresponding state. The following systems are examples of Responsibilities: * Kademlia * OverlayCache * PointerDB * StatDB * PieceStore * etc. A Provider is a collection of Responsibilities that share an Identity, such as: * The heavy client * The farmer * The gateway An Identity is a public/private key pair, a node id, etc. Farmers all need different Identities, so captplanet needs to support running multiple concurrent Providers with different Identities. Each Responsibility and Provider should allow for configuration of multiple copies on its own so creating Responsibilities and Providers use a new workflow. To make a Responsibility, one should create a "config" struct, such as: ``` type Config struct { RepairThreshold int `help:"If redundancy falls below this number of pieces, repair is triggered" default:"30"` SuccessThreshold int `help:"If redundancy is above this number then no additional uploads are needed" default:"40"` } ``` To use "config" structs, this changeset introduces another new library called 'cfgstruct', which allows for the configuration of arbitrary structs through flagsets, and thus through cobra and viper. cfgstruct relies on Go's "struct tags" feature to document help information and default values. Config structs can be configured via cfgstruct.Bind for binding the struct to a flagset. Because this configuration system makes setup and configuration easier *in general*, additional commands are provided that allow for easy standup of separate Providers. Please make sure to check out: * cmd/captplanet/farmer/main.go (a new farmer binary) * cmd/captplanet/hc/main.go (a new heavy client binary) * cmd/captplanet/gw/main.go (a new minio gateway binary) Usage: ``` $ go install -v storj.io/storj/cmd/captplanet $ captplanet setup $ captplanet run ``` Configuration is placed by default in `~/.storj/capt/` Other changes: * introduces new config structs for currently existing Responsibilities that conform to the new Responsibility interface. Please see the `pkg/*/config.go` files for examples. * integrates the PointerDB API key with other global configuration via flags, instead of through environment variables through viper like it's been doing. (ultimately this should also change to use the PointerDB config struct but this is an okay shortterm solution). * changes the Overlay cache to use a URL for database configuration instead of separate redis and bolt config settings. * stubs out some peer identity skeleton code (but not the meat). * Fixes the SegmentStore to use the overlay client and pointerdb clients instead of gRPC client code directly * Leaves a very clear spot where we need to tie the object to stream to segment store together. There's sort of a "golden spike" opportunity to connect all the train tracks together at the bottom of pkg/miniogw/config.go, labeled with a bunch of TODOs. Future stuff: * I now prefer this design over the original pkg/process.Service thing I had been pushing before (sorry!) * The experience of trying to have multiple farmers configurable concurrently led me to prefer config structs over global flags (I finally came around) or using viper directly. I think global flags are okay sometimes but in general going forward we should try and get all relevant config into config structs. * If you all like this direction, I think we can go delete my old Service interfaces and a bunch of flags and clean up a bunch of stuff. * If you don't like this direction, it's no sweat at all, and despite how much code there is here I'm not very tied to any of this! Considering a lot of this was written between midnight and 6 am, it might not be any good! * bind tests
2018-07-24 17:08:28 +01:00
package miniogw
import (
"context"
"io"
"time"
minio "github.com/minio/minio/cmd"
"github.com/minio/minio/pkg/auth"
"github.com/minio/minio/pkg/hash"
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
"github.com/zeebo/errs"
monkit "gopkg.in/spacemonkeygo/monkit.v2"
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
"storj.io/storj/pkg/paths"
"storj.io/storj/pkg/ranger"
"storj.io/storj/pkg/storage/buckets"
"storj.io/storj/pkg/storage/meta"
"storj.io/storj/pkg/storage/objects"
"storj.io/storj/pkg/utils"
"storj.io/storj/storage"
)
var (
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
mon = monkit.Package()
//Error is the errs class of standard End User Client errors
Error = errs.Class("Storj Gateway error")
)
captplanet (#159) * captplanet I kind of went overboard this weekend. The major goal of this changeset is to provide an environment for local development where all of the various services can be easily run together. Developing on Storj v3 should be as easy as running a setup command and a run command! To do this, this changeset introduces a new tool called captplanet, which combines the powers of the Overlay Cache, the PointerDB, the PieceStore, Kademlia, the Minio Gateway, etc. Running 40 farmers and a heavy client inside the same process forced a rethinking of the "services" that we had. To avoid confusion by reusing prior terms, this changeset introduces two new types: Providers and Responsibilities. I wanted to avoid as many merge conflicts as possible, so I left the existing Services and code for now, but if people like this route we can clean up the duplication. A Responsibility is a collection of gRPC methods and corresponding state. The following systems are examples of Responsibilities: * Kademlia * OverlayCache * PointerDB * StatDB * PieceStore * etc. A Provider is a collection of Responsibilities that share an Identity, such as: * The heavy client * The farmer * The gateway An Identity is a public/private key pair, a node id, etc. Farmers all need different Identities, so captplanet needs to support running multiple concurrent Providers with different Identities. Each Responsibility and Provider should allow for configuration of multiple copies on its own so creating Responsibilities and Providers use a new workflow. To make a Responsibility, one should create a "config" struct, such as: ``` type Config struct { RepairThreshold int `help:"If redundancy falls below this number of pieces, repair is triggered" default:"30"` SuccessThreshold int `help:"If redundancy is above this number then no additional uploads are needed" default:"40"` } ``` To use "config" structs, this changeset introduces another new library called 'cfgstruct', which allows for the configuration of arbitrary structs through flagsets, and thus through cobra and viper. cfgstruct relies on Go's "struct tags" feature to document help information and default values. Config structs can be configured via cfgstruct.Bind for binding the struct to a flagset. Because this configuration system makes setup and configuration easier *in general*, additional commands are provided that allow for easy standup of separate Providers. Please make sure to check out: * cmd/captplanet/farmer/main.go (a new farmer binary) * cmd/captplanet/hc/main.go (a new heavy client binary) * cmd/captplanet/gw/main.go (a new minio gateway binary) Usage: ``` $ go install -v storj.io/storj/cmd/captplanet $ captplanet setup $ captplanet run ``` Configuration is placed by default in `~/.storj/capt/` Other changes: * introduces new config structs for currently existing Responsibilities that conform to the new Responsibility interface. Please see the `pkg/*/config.go` files for examples. * integrates the PointerDB API key with other global configuration via flags, instead of through environment variables through viper like it's been doing. (ultimately this should also change to use the PointerDB config struct but this is an okay shortterm solution). * changes the Overlay cache to use a URL for database configuration instead of separate redis and bolt config settings. * stubs out some peer identity skeleton code (but not the meat). * Fixes the SegmentStore to use the overlay client and pointerdb clients instead of gRPC client code directly * Leaves a very clear spot where we need to tie the object to stream to segment store together. There's sort of a "golden spike" opportunity to connect all the train tracks together at the bottom of pkg/miniogw/config.go, labeled with a bunch of TODOs. Future stuff: * I now prefer this design over the original pkg/process.Service thing I had been pushing before (sorry!) * The experience of trying to have multiple farmers configurable concurrently led me to prefer config structs over global flags (I finally came around) or using viper directly. I think global flags are okay sometimes but in general going forward we should try and get all relevant config into config structs. * If you all like this direction, I think we can go delete my old Service interfaces and a bunch of flags and clean up a bunch of stuff. * If you don't like this direction, it's no sweat at all, and despite how much code there is here I'm not very tied to any of this! Considering a lot of this was written between midnight and 6 am, it might not be any good! * bind tests
2018-07-24 17:08:28 +01:00
// NewStorjGateway creates a *Storj object from an existing ObjectStore
func NewStorjGateway(bs buckets.Store) *Storj {
return &Storj{bs: bs}
}
//Storj is the implementation of a minio cmd.Gateway
type Storj struct {
bs buckets.Store
}
// Name implements cmd.Gateway
func (s *Storj) Name() string {
return "storj"
}
// NewGatewayLayer implements cmd.Gateway
func (s *Storj) NewGatewayLayer(creds auth.Credentials) (
minio.ObjectLayer, error) {
return &storjObjects{storj: s}, nil
}
// Production implements cmd.Gateway
func (s *Storj) Production() bool {
return false
}
type storjObjects struct {
minio.GatewayUnsupported
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
storj *Storj
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
func (s *storjObjects) DeleteBucket(ctx context.Context, bucket string) (err error) {
defer mon.Task()(&ctx)(&err)
_, err = s.storj.bs.Get(ctx, bucket)
if err != nil {
if storage.ErrKeyNotFound.Has(err) {
return minio.BucketNotFound{Bucket: bucket}
}
return err
}
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return err
}
items, _, err := o.List(ctx, nil, nil, nil, true, 1, meta.None)
if err != nil {
return err
}
if len(items) > 0 {
return minio.BucketNotEmpty{Bucket: bucket}
}
return s.storj.bs.Delete(ctx, bucket)
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
func (s *storjObjects) DeleteObject(ctx context.Context, bucket, object string) (err error) {
defer mon.Task()(&ctx)(&err)
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return err
}
return o.Delete(ctx, paths.New(object))
}
func (s *storjObjects) GetBucketInfo(ctx context.Context, bucket string) (
bucketInfo minio.BucketInfo, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
meta, err := s.storj.bs.Get(ctx, bucket)
2018-08-23 01:19:46 +01:00
if err != nil {
2018-08-23 01:19:46 +01:00
if storage.ErrKeyNotFound.Has(err) {
return bucketInfo, minio.BucketNotFound{Bucket: bucket}
}
return bucketInfo, err
}
2018-08-23 01:19:46 +01:00
return minio.BucketInfo{Name: bucket, Created: meta.Created}, nil
}
func (s *storjObjects) getObject(ctx context.Context, bucket, object string) (rr ranger.RangeCloser, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return nil, err
}
rr, _, err = o.Get(ctx, paths.New(object))
return rr, err
}
func (s *storjObjects) GetObject(ctx context.Context, bucket, object string,
startOffset int64, length int64, writer io.Writer, etag string) (err error) {
defer mon.Task()(&ctx)(&err)
rr, err := s.getObject(ctx, bucket, object)
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
if err != nil {
return err
}
defer utils.LogClose(rr)
if length == -1 {
length = rr.Size() - startOffset
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
r, err := rr.Range(ctx, startOffset, length)
if err != nil {
return err
}
defer utils.LogClose(r)
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
_, err = io.Copy(writer, r)
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
return err
}
func (s *storjObjects) GetObjectInfo(ctx context.Context, bucket,
object string) (objInfo minio.ObjectInfo, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return minio.ObjectInfo{}, err
}
m, err := o.Meta(ctx, paths.New(object))
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
if err != nil {
if storage.ErrKeyNotFound.Has(err) {
return objInfo, minio.ObjectNotFound{
Bucket: bucket,
Object: object,
}
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
return objInfo, err
}
return minio.ObjectInfo{
Name: object,
Bucket: bucket,
ModTime: m.Modified,
Size: m.Size,
ETag: m.Checksum,
ContentType: m.ContentType,
UserDefined: m.UserDefined,
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
}, err
}
func (s *storjObjects) ListBuckets(ctx context.Context) (
bucketItems []minio.BucketInfo, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
startAfter := ""
var items []buckets.ListItem
for {
moreItems, more, err := s.storj.bs.List(ctx, startAfter, "", 0)
if err != nil {
return nil, err
}
items = append(items, moreItems...)
if !more {
break
}
startAfter = moreItems[len(moreItems)-1].Bucket
}
bucketItems = make([]minio.BucketInfo, len(items))
for i, item := range items {
bucketItems[i].Name = item.Bucket
bucketItems[i].Created = item.Meta.Created
}
return bucketItems, err
}
func (s *storjObjects) ListObjects(ctx context.Context, bucket, prefix, marker,
delimiter string, maxKeys int) (result minio.ListObjectsInfo, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
startAfter := paths.New(marker)
var fl []minio.ObjectInfo
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return minio.ListObjectsInfo{}, err
}
items, more, err := o.List(ctx, paths.New(prefix), startAfter, nil, true, maxKeys, meta.All)
if err != nil {
return result, err
}
if len(items) > 0 {
//Populate the objectlist (aka filelist)
f := make([]minio.ObjectInfo, len(items))
for i, fi := range items {
f[i] = minio.ObjectInfo{
Bucket: bucket,
IsDir: fi.IsPrefix,
Name: fi.Path.String(),
ModTime: fi.Meta.Modified,
Size: fi.Meta.Size,
ContentType: fi.Meta.ContentType,
UserDefined: fi.Meta.UserDefined,
ETag: fi.Meta.Checksum,
}
}
startAfter = items[len(items)-1].Path[len(paths.New(prefix)):]
fl = f
}
result = minio.ListObjectsInfo{
IsTruncated: more,
Objects: fl,
}
if more {
result.NextMarker = startAfter.String()
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
return result, err
}
func (s *storjObjects) MakeBucketWithLocation(ctx context.Context,
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
bucket string, location string) (err error) {
defer mon.Task()(&ctx)(&err)
// TODO: This current strategy of calling bs.Get
// to check if a bucket exists, then calling bs.Put
// if not, can create a race condition if two people
// call MakeBucketWithLocation at the same time and
// therefore try to Put a bucket at the same time.
// The reason for the Get call to check if the
// bucket already exists is to match S3 CLI behavior.
_, err = s.storj.bs.Get(ctx, bucket)
if err == nil {
return minio.BucketAlreadyExists{Bucket: bucket}
}
if !storage.ErrKeyNotFound.Has(err) {
return err
}
_, err = s.storj.bs.Put(ctx, bucket)
return err
}
func (s *storjObjects) CopyObject(ctx context.Context, srcBucket, srcObject, destBucket,
destObject string, srcInfo minio.ObjectInfo) (objInfo minio.ObjectInfo, err error) {
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
defer mon.Task()(&ctx)(&err)
rr, err := s.getObject(ctx, srcBucket, srcObject)
if err != nil {
return objInfo, err
}
defer utils.LogClose(rr)
r, err := rr.Range(ctx, 0, rr.Size())
if err != nil {
return objInfo, err
}
defer utils.LogClose(r)
serMetaInfo := objects.SerializableMeta{
ContentType: srcInfo.ContentType,
UserDefined: srcInfo.UserDefined,
}
return s.putObject(ctx, destBucket, destObject, r, serMetaInfo)
}
func (s *storjObjects) putObject(ctx context.Context, bucket, object string, r io.Reader,
meta objects.SerializableMeta) (objInfo minio.ObjectInfo, err error) {
defer mon.Task()(&ctx)(&err)
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
// setting zero value means the object never expires
expTime := time.Time{}
o, err := s.storj.bs.GetObjectStore(ctx, bucket)
if err != nil {
return minio.ObjectInfo{}, err
}
m, err := o.Put(ctx, paths.New(object), r, meta, expTime)
return minio.ObjectInfo{
Name: object,
Bucket: bucket,
ModTime: m.Modified,
Size: m.Size,
ETag: m.Checksum,
ContentType: m.ContentType,
UserDefined: m.UserDefined,
}, err
}
func (s *storjObjects) PutObject(ctx context.Context, bucket, object string,
data *hash.Reader, metadata map[string]string) (objInfo minio.ObjectInfo,
err error) {
defer mon.Task()(&ctx)(&err)
tempContType := metadata["content-type"]
delete(metadata, "content-type")
//metadata serialized
serMetaInfo := objects.SerializableMeta{
ContentType: tempContType,
UserDefined: metadata,
}
return s.putObject(ctx, bucket, object, data, serMetaInfo)
}
Implement miniogw in terms of ObjectStore (#117) * port changes * Task monitor and setup merge from the staging * Restructure + additional interface * Add NewOverlayClient * integrated DHT client interface * added test for interface * PR comments addressed * lint issue * added generated protobuf * adding new interface * added the interface framework * deleted file * fixes compilation errors and integrates new dhtcclient interface * merged netstat latest changes and dht new interface chagnes * fixed the address's port * adding comments * PR comments addressed * netclient interface dial method added * rename and integrated transportclient with minio gateway * rename and code clean up * made changes based on the Dennis's changes on the kad-client * Code review comment changes based on kaloyan review comments * reverted the changes to be similar to master * removed unused file * renamed to transportclient * added the review changes * store the address of the client * updates per the code review comments, changes-> added error retry connection attempt logic, added error conditions including nil parameters * updated the test case to test the bad address passed condition * updated the code per code review comments * Bolt backed overlay cache (#94) * wip * add separate `Process` tests for bolt and redis-backed overlay * more testing * fix gitignore * fix linter error * goimports goimports GOIMPORTS GoImPortS!!!! * fix port madness * forgot to add * add `mux` as handler and shorten context timeouts * gofreakingimports * fix comments * refactor test & add logger/monkit registry * debugging travis * add comment * Set redisAddress to empty string for bolt-test * travis experiment * refactoring tests * Merge remote-tracking branch 'upstream/master' into bolt-backed-overlay-cache * Automatically build, tag and push docker images on merge to master (#103) * port changes * build overlay on successful merge to master * fixes to Makefile * permissions * dep ensure * gopath * let's try vgo * remove dep * maybe alpine is the issue * tagging go version on build * stupid vgo * vgo * adding tags to push * quotes * local linting fixes & stupid travis * prepend storjlabs to docker tag (#108) * port changes * fixing tag name * Use continue instead of return in table tests (#106) I did a dumb mistake for some of the table tests, which made some of the test cases not being executed. * pkg/kademlia tests and restructuring (#97) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * files created * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * Merge remote-tracking branch 'upstream/master' into coyle/kad-tests * wip * remove bkad dependencie from tests * wip * wip * wip * wip * wip * updated coyle/kademlia * wip * cleanup * ports * overlay upgraded * linter fixes * piecestore kademlia newID * add changes from kad demo * PR comments addresses * go func * force travis build * fixed merge conflicts * fixed merge conflicts * Merge branch 'coyle/kad-tests' of https://github.com/coyle/storj into coyle/kad-tests * linter issues * linting issues * fixed merge conflicts * linter is stupid * Coyle/docker fix (#109) * port changes * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master' * Merge branch 'master' of https://github.com/storj/storj * fixing tag name * no idea * testing * changes * testing on travis * testing * changes to travis build * new approach * Merge branch 'master' into coyle/docker-fix * hardcode version (#111) * hardcode version * adding coveralls / code coverage (#112) * adding coveralls * adding code coverage badge * fixing badges * verbose * swap tests and coverage * extra line * maybe * maybe * moar * gover maybe * testing * cleanup * protos/netstate: remove stuff we're not using (#100) * protos/netstate: remove stuff we're not using * protos/netstate: add metadata field for segmentstore * fix netstate client test * pkg/process: start replacing pkg/process with cobra helpers (#98) * Implement psclient interface (#107) * Implement psclient interface * Add string method to pieceID type * try to fix linter errors * Whoops missed an error * More linter errors * Typo * Lol double typo * Get everything working, begin adding tests for psclient rpc * goimports * Forgot to change the piecestore cli when changed the piecestore code * Fix CLI * remove ID length, added validator to pieceID * Move grpc ranger to client Change client PUT api to take a reader rather than return a writer * GRPCRanger -> PieceRanger; Make PieceRanger a RangeCloser * Forgot to remove offset * Added message upon successful store * Do that thing dennis and kaloyan wanted * goimports * Make closeConn a part of the interface for psclient * Use interface * Removed uneccessary new lines * goimport * Whoops * Actually we don't want to use the interface in Piece Ranger * Renamed piecestore in examples to piecestore-client; moved piecestore-cli to examples * Make comments look nicer * modified transport client based on the the design discussion * modified transport client based on the the design discussion * added the as discussed connection cache interface functionality * added the as discussed connection cache interface functionality * transport client changes * transport client per code review changes * per the code review comments * transport client incorporates review comments * fixes lint warnings * lint warning fixes....client interface has to be Client * initial draft of Objectstore * transport client review changes * client.go changes * transport.go changes * added test case * added test cases * streams iface * comment fix * object store changes * comment fix * initialized the objectstore in gw * Added PutObject with test support for encryption file * added object store test cases * tested & integrated the objectstore with miniogw * handled the ranger and paths * indentation change * Kalyon's code review comments resolution implemented after the 30min code review meeting * Compilation error fix * fixes the tavis build warnings * corrects the ListObject return type to be slice of slice * corrects the ListObject return type to be slice of slice * added the serialization using protobuf * added the unmarshalling of data in getobject() * Jt's Review comments * Kaloyan's review comments, moved the unmarshalling logic and other minor code indentation fixes * more code reivew * more code reivew * Changes the expiration time to zeroTime and added error check in putObject function * Changes the expiration time to zeroTime and added error check in putObject function * minor warning fix- had to add a comment and fix the wording * added a TODO comment per kaloyan * code clean up removed unused variables
2018-07-12 18:29:02 +01:00
func (s *storjObjects) Shutdown(ctx context.Context) (err error) {
defer mon.Task()(&ctx)(&err)
return nil
}
func (s *storjObjects) StorageInfo(context.Context) minio.StorageInfo {
return minio.StorageInfo{}
}