storj/cmd
Ivan Fraixedes 7288d01781
cmd/segment-reaper: several refactorings (#3637)
* Move the observer implementation and the type definitions related with
  it and helper functions to its own file.
* Cluster struct type is used as a key for a ObjectsMap type.
  Observer struct type has a field of ObjectsMap.
  Cluster has a field for project ID.
  Observer processSegment method uses its ObjectMap field for tracking
  objects.

  However Observer processSegment clears the map once the projectID
  diverges from the one kept in the Observer lastProjectID field, meaning
  that it isn't needed to keep the projectID as part of the ObjectMap key.

  For this reason, ObjectMap can use as a key just only the bucket name
  and Cluster struct isn't needed.

  Because of such change, the ObjectMap type has been renamed to a more
  descriptive name.
* Make the types defined for this specific package not being exported.
* Create a constructor function for observer to encapsulate the map
  allocation.
* Don't throw away the entirely buckets objects map when an empty one
  is used to reuse part of the allocations.

  Encapsulate the clearing up logic into a method.
* Make the analyzeProject function to be a method of observer.
2019-11-27 10:28:43 +01:00
..
certificates private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gateway lib/uplink: explain safe versions (#3644) 2019-11-25 16:55:54 +01:00
identity private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
inspector satellite/payments: invoice creation (#3468) 2019-11-05 15:16:02 +02:00
internal private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
linksharing private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
s3-benchmark private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
satellite private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
segment-reaper cmd/segment-reaper: several refactorings (#3637) 2019-11-27 10:28:43 +01:00
statreceiver private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
storagenode add completion receipt to exit-status cli command on storage node (#3650) 2019-11-26 12:32:26 -05:00
storagenode-updater storagenode/updater: read identity location from storagenode's config.yaml (#3607) 2019-11-22 15:57:37 +02:00
storj-sim web/satellite: registration/welcome message fixed, usage-report url fixed, storj-sim fixed (#3622) 2019-11-22 19:03:15 +02:00
uplink lib/uplink: explain safe versions (#3644) 2019-11-25 16:55:54 +01:00
versioncontrol private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00