Revise internal/neofs
package
#494
Labels
enhancement
Improving existing functionality
good first issue
Good for newcomers
I4
No visible changes
S2
Regular significance
U4
Nothing urgent
Initial idea of creating a type
neofs-s3-gw/internal/neofs/neofs.go
Line 34 in dbfac29
After subsequent refactors its orientation has been changed to providing application-specific features. I suggest to revise this architecture.
I can think of two possible approaches
internal/neofs - global window into NeoFS
We get rid of any app-specific info from
internal/neofs
package. It imports only NeoFS SDK Go functionality.NeoFS
type provides full functionality required within the framework of S3 needs, but can be used as an autonomous entitiy (true mediator). Each application implements its NeoFS-related needs locally through singleinternal/neofs.NeoFS
type. Seems likeSome local dependencies can be similar, but the are not the same.
internal/neofs - collection of implementations
Differs with previous approach that each type in the
internal/neofs
package is an implementation of one dependency of one application. The mediator mentioned in the first approach is also present, but it is not exported from the package. Seems likeAs for me, first approach looks clearer. In both approaches, I consider it important to loosen the coupling of types between applications.
The text was updated successfully, but these errors were encountered: