diff options
| author | Lisandro Pin <lisandro.pin@proton.ch> | 2025-11-04 22:02:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-04 13:02:22 -0800 |
| commit | f466ff1412005f3db10de9dc4939e52cb4a2add8 (patch) | |
| tree | 13d7a135fc7b20b94c95631b1477ad7b82ca6927 /weed/server/volume_server.go | |
| parent | f4f2718ba05b13c51f14a316c48a256da6a77fe8 (diff) | |
| download | seaweedfs-f466ff1412005f3db10de9dc4939e52cb4a2add8.tar.xz seaweedfs-f466ff1412005f3db10de9dc4939e52cb4a2add8.zip | |
Nit: use `time.Duration`s instead of constants in seconds. (#7438)
Nit: use `time.Durations` instead of constants in seconds. Makes for slightly more readable code.
Diffstat (limited to 'weed/server/volume_server.go')
| -rw-r--r-- | weed/server/volume_server.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 66c62b98c..4f8a7fb0d 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -35,7 +35,7 @@ type VolumeServer struct { SeedMasterNodes []pb.ServerAddress whiteList []string currentMaster pb.ServerAddress - pulseSeconds int + pulsePeriod time.Duration dataCenter string rack string store *storage.Store @@ -59,7 +59,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, folders []string, maxCounts []int32, minFreeSpaces []util.MinFreeSpace, diskTypes []types.DiskType, idxFolder string, needleMapKind storage.NeedleMapKind, - masterNodes []pb.ServerAddress, pulseSeconds int, + masterNodes []pb.ServerAddress, pulsePeriod time.Duration, dataCenter string, rack string, whiteList []string, fixJpgOrientation bool, @@ -86,7 +86,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, readExpiresAfterSec := v.GetInt("jwt.signing.read.expires_after_seconds") vs := &VolumeServer{ - pulseSeconds: pulseSeconds, + pulsePeriod: pulsePeriod, dataCenter: dataCenter, rack: rack, needleMapKind: needleMapKind, |
