[#223] sg: Refactor storage group parameters

Resolve containedctx linter for SearchSGPrm and GetSGPrm  structs.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-06 13:41:45 +03:00
parent 6016d78a45
commit ae86cda58c
3 changed files with 8 additions and 16 deletions

View file

@ -11,10 +11,7 @@ import (
)
// SearchSGPrm groups the parameters which are formed by Processor to search the storage group objects.
// nolint: containedctx
type SearchSGPrm struct {
Context context.Context
Container cid.ID
NodeInfo client.NodeInfo
@ -26,10 +23,7 @@ type SearchSGDst struct {
}
// GetSGPrm groups parameter of GetSG operation.
// nolint: containedctx
type GetSGPrm struct {
Context context.Context
OID oid.ID
CID cid.ID
@ -42,11 +36,11 @@ type SGSource interface {
// ListSG must list storage group objects in the container. Formed list must be written to destination.
//
// Must return any error encountered which did not allow to form the list.
ListSG(*SearchSGDst, SearchSGPrm) error
ListSG(context.Context, *SearchSGDst, SearchSGPrm) error
// GetSG must return storage group object for the provided CID, OID,
// container and netmap state.
GetSG(GetSGPrm) (*storagegroup.StorageGroup, error)
GetSG(context.Context, GetSGPrm) (*storagegroup.StorageGroup, error)
}
// StorageGroup combines storage group object ID and its structure.