-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathparameters.go
More file actions
1859 lines (1814 loc) · 68.6 KB
/
parameters.go
File metadata and controls
1859 lines (1814 loc) · 68.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by go generate; DO NOT EDIT.
/***************************************************************
*
* Copyright (C) 2024, Pelican Project, Morgridge Institute for Research
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
***************************************************************/
package param
import (
"time"
"github.com/spf13/viper"
)
type StringParam struct {
name string
}
type StringSliceParam struct {
name string
}
type BoolParam struct {
name string
}
type IntParam struct {
name string
}
type DurationParam struct {
name string
}
type ObjectParam struct {
name string
}
func GetDeprecated() map[string][]string {
return map[string][]string{
"Cache.DataLocation": {"Cache.StorageLocation"},
"Cache.DbLocation": {"Server.DbLocation"},
"Cache.LocalRoot": {"Cache.StorageLocation"},
"Debug": {"Logging.Level"},
"Director.DbLocation": {"Server.DbLocation"},
"Director.EnableStat": {"Director.CheckOriginPresence"},
"DisableHttpProxy": {"Client.DisableHttpProxy"},
"DisableProxyFallback": {"Client.DisableProxyFallback"},
"IssuerKey": {"none"},
"Lotman.DbLocation": {"Lotman.LotHome"},
"MinimumDownloadSpeed": {"Client.MinimumDownloadSpeed"},
"Origin.EnableDirListing": {"Origin.EnableListings"},
"Origin.EnableFallbackRead": {"Origin.EnableDirectReads"},
"Origin.EnableWrite": {"Origin.EnableWrites"},
"Origin.ExportVolume": {"Origin.ExportVolumes"},
"Origin.Mode": {"Origin.StorageType"},
"Origin.NamespacePrefix": {"Origin.FederationPrefix"},
"Origin.S3ServiceName": {"none"},
"Registry.AdminUsers": {"Server.UIAdminUsers"},
"Registry.DbLocation": {"Server.DbLocation"},
"Server.TLSCertificate": {"Server.TLSCertificateChain"},
"Xrootd.Port": {"Origin.Port", "Cache.Port"},
"Xrootd.RunLocation": {"Cache.RunLocation", "Origin.RunLocation"},
}
}
// runtimeConfigurableMap is a map of parameter names to their runtime configurability status.
// It is generated from docs/parameters.yaml and indicates whether a parameter can be reloaded
// at runtime without requiring a server restart.
var runtimeConfigurableMap = map[string]bool{
"Cache.BlocksToPrefetch": false,
"Cache.ClientStatisticsLocation": false,
"Cache.Concurrency": false,
"Cache.ConcurrencyDegradedThreshold": false,
"Cache.DataLocation": false,
"Cache.DataLocations": false,
"Cache.DbLocation": false,
"Cache.DefaultCacheTimeout": false,
"Cache.EnableBroker": false,
"Cache.EnableEvictionMonitoring": false,
"Cache.EnableLotman": false,
"Cache.EnableOIDC": false,
"Cache.EnablePrefetch": false,
"Cache.EnableSiteLocalMode": false,
"Cache.EnableTLSClientAuth": false,
"Cache.EnableVoms": false,
"Cache.EvictionMonitoringInterval": false,
"Cache.EvictionMonitoringMaxDepth": false,
"Cache.ExportLocation": false,
"Cache.FedTokenLocation": false,
"Cache.FilesBaseSize": false,
"Cache.FilesMaxSize": false,
"Cache.FilesNominalSize": false,
"Cache.HighWaterMark": false,
"Cache.LocalRoot": false,
"Cache.LowWatermark": false,
"Cache.MetaLocations": false,
"Cache.NamespaceLocation": false,
"Cache.PermittedNamespaces": false,
"Cache.Port": false,
"Cache.RunLocation": false,
"Cache.SelfTest": false,
"Cache.SelfTestInterval": false,
"Cache.SelfTestMaxAge": false,
"Cache.SentinelLocation": false,
"Cache.StorageLocation": false,
"Cache.Url": false,
"Cache.XRootDPrefix": false,
"Client.AssumeDirectorServerHeader": false,
"Client.DirectorRetries": false,
"Client.DisableHttpProxy": false,
"Client.DisableProxyFallback": false,
"Client.EnableOverwrites": false,
"Client.IsPlugin": false,
"Client.MaximumDownloadSpeed": false,
"Client.MinimumDownloadSpeed": false,
"Client.PreferredCaches": false,
"Client.SlowTransferRampupTime": false,
"Client.SlowTransferWindow": false,
"Client.StoppedTransferTimeout": false,
"Client.WorkerCount": false,
"ConfigLocations": false,
"Debug": false,
"Director.AdaptiveSortEWMATimeConstant": false,
"Director.AdaptiveSortTruncateConstant": false,
"Director.AdvertiseUrl": false,
"Director.AdvertisementTTL": false,
"Director.AssumePresenceAtSingleOrigin": false,
"Director.CachePresenceCapacity": false,
"Director.CachePresenceTTL": false,
"Director.CacheResponseHostnames": false,
"Director.CacheSortMethod": false,
"Director.CachesPullFromCaches": false,
"Director.CheckCachePresence": false,
"Director.CheckOriginPresence": false,
"Director.DbLocation": false,
"Director.DefaultResponse": false,
"Director.EnableBroker": false,
"Director.EnableOIDC": false,
"Director.EnableStat": false,
"Director.FedTokenLifetime": false,
"Director.FilterCachesInErrorState": false,
"Director.FilteredServers": false,
"Director.GeoIPLocation": false,
"Director.MaxMindKey": false,
"Director.MaxMindKeyFile": false,
"Director.MaxStatResponse": false,
"Director.MinStatResponse": false,
"Director.OriginCacheHealthTestInterval": false,
"Director.OriginResponseHostnames": false,
"Director.RegistryQueryInterval": false,
"Director.StatConcurrencyLimit": false,
"Director.StatTimeout": false,
"Director.SupportContactEmail": false,
"Director.SupportContactUrl": false,
"DisableHttpProxy": false,
"DisableProxyFallback": false,
"Federation.DiscoveryUrl": false,
"Federation.TopologyDowntimeUrl": false,
"Federation.TopologyNamespaceUrl": false,
"Federation.TopologyReloadInterval": false,
"Federation.TopologyUrl": false,
"GeoIPOverrides": false,
"Issuer.AuthenticationSource": false,
"Issuer.AuthorizationTemplates": false,
"Issuer.GroupFile": false,
"Issuer.GroupRequirements": false,
"Issuer.GroupSource": false,
"Issuer.IssuerClaimValue": false,
"Issuer.OIDCAuthenticationRequirements": false,
"Issuer.OIDCAuthenticationUserClaim": false,
"Issuer.OIDCGroupClaim": false,
"Issuer.OIDCPreferClaimsFromIDToken": false,
"Issuer.QDLLocation": false,
"Issuer.RedirectUris": false,
"Issuer.ScitokensServerLocation": false,
"Issuer.TomcatLocation": false,
"Issuer.UserStripDomain": false,
"IssuerKey": false,
"IssuerKeysDirectory": false,
"LocalCache.DataLocation": false,
"LocalCache.HighWaterMarkPercentage": false,
"LocalCache.LowWaterMarkPercentage": false,
"LocalCache.RunLocation": false,
"LocalCache.Size": false,
"LocalCache.Socket": false,
"Logging.Cache.Http": false,
"Logging.Cache.Ofs": false,
"Logging.Cache.Pfc": false,
"Logging.Cache.Pss": false,
"Logging.Cache.PssSetOpt": false,
"Logging.Cache.Scitokens": false,
"Logging.Cache.Xrd": false,
"Logging.Cache.Xrootd": false,
"Logging.Client.ProgressInterval": false,
"Logging.DisableProgressBars": false,
"Logging.Level": true,
"Logging.LogLocation": false,
"Logging.Origin.Cms": false,
"Logging.Origin.Http": false,
"Logging.Origin.Ofs": false,
"Logging.Origin.Oss": false,
"Logging.Origin.Scitokens": false,
"Logging.Origin.Xrd": false,
"Logging.Origin.Xrootd": false,
"Lotman.DbLocation": false,
"Lotman.DefaultLotDeletionLifetime": false,
"Lotman.DefaultLotExpirationLifetime": false,
"Lotman.EnableAPI": false,
"Lotman.EnabledPolicy": false,
"Lotman.LibLocation": false,
"Lotman.LotHome": false,
"Lotman.PolicyDefinitions": false,
"MinimumDownloadSpeed": false,
"Monitoring.AggregatePrefixes": false,
"Monitoring.DataLocation": false,
"Monitoring.DataRetention": false,
"Monitoring.DataRetentionSize": false,
"Monitoring.EnablePrometheus": false,
"Monitoring.LabelLimit": false,
"Monitoring.LabelNameLengthLimit": false,
"Monitoring.LabelValueLengthLimit": false,
"Monitoring.MetricAuthorization": false,
"Monitoring.PortHigher": false,
"Monitoring.PortLower": false,
"Monitoring.PromQLAuthorization": false,
"Monitoring.SampleLimit": false,
"Monitoring.TokenExpiresIn": false,
"Monitoring.TokenRefreshInterval": false,
"OIDC.AuthorizationEndpoint": false,
"OIDC.ClientID": false,
"OIDC.ClientIDFile": false,
"OIDC.ClientRedirectHostname": false,
"OIDC.ClientSecretFile": false,
"OIDC.DeviceAuthEndpoint": false,
"OIDC.Issuer": false,
"OIDC.Scopes": false,
"OIDC.TokenEndpoint": false,
"OIDC.UserInfoEndpoint": false,
"Origin.Concurrency": false,
"Origin.ConcurrencyDegradedThreshold": false,
"Origin.DbLocation": false,
"Origin.DirectorTest": false,
"Origin.DisableDirectClients": false,
"Origin.EnableBroker": false,
"Origin.EnableCmsd": false,
"Origin.EnableDirListing": false,
"Origin.EnableDirectReads": false,
"Origin.EnableFallbackRead": false,
"Origin.EnableIssuer": false,
"Origin.EnableListings": false,
"Origin.EnableMacaroons": false,
"Origin.EnableOIDC": false,
"Origin.EnablePublicReads": false,
"Origin.EnableReads": false,
"Origin.EnableVoms": false,
"Origin.EnableWrite": false,
"Origin.EnableWrites": false,
"Origin.ExportVolume": false,
"Origin.ExportVolumes": false,
"Origin.Exports": false,
"Origin.FedTokenLocation": false,
"Origin.FederationPrefix": false,
"Origin.GlobusClientIDFile": false,
"Origin.GlobusClientSecretFile": false,
"Origin.GlobusCollectionID": false,
"Origin.GlobusCollectionName": false,
"Origin.GlobusConfigLocation": false,
"Origin.HttpAuthTokenFile": false,
"Origin.HttpServiceUrl": false,
"Origin.Mode": false,
"Origin.Multiuser": false,
"Origin.NamespacePrefix": false,
"Origin.Port": false,
"Origin.RunLocation": false,
"Origin.S3AccessKeyfile": false,
"Origin.S3Bucket": false,
"Origin.S3Region": false,
"Origin.S3SecretKeyfile": false,
"Origin.S3ServiceName": false,
"Origin.S3ServiceUrl": false,
"Origin.S3UrlStyle": false,
"Origin.ScitokensDefaultUser": false,
"Origin.ScitokensMapSubject": false,
"Origin.ScitokensNameMapFile": false,
"Origin.ScitokensRestrictedPaths": false,
"Origin.ScitokensUsernameClaim": false,
"Origin.SelfTest": false,
"Origin.SelfTestInterval": false,
"Origin.SelfTestMaxAge": false,
"Origin.StoragePrefix": false,
"Origin.StorageType": false,
"Origin.TokenAudience": false,
"Origin.Url": false,
"Origin.XRootDPrefix": false,
"Origin.XRootServiceUrl": false,
"Plugin.Token": false,
"Registry.AdminUsers": false,
"Registry.CustomRegistrationFields": false,
"Registry.DbLocation": false,
"Registry.Institutions": false,
"Registry.InstitutionsUrl": false,
"Registry.InstitutionsUrlReloadMinutes": false,
"Registry.RequireCacheApproval": false,
"Registry.RequireKeyChaining": false,
"Registry.RequireOriginApproval": false,
"RuntimeDir": false,
"Server.AdLifetime": false,
"Server.AdvertisementInterval": false,
"Server.DbLocation": false,
"Server.DirectorUrls": false,
"Server.DropPrivileges": false,
"Server.EnablePKCS11": false,
"Server.EnablePprof": false,
"Server.EnableUI": false,
"Server.ExternalWebUrl": false,
"Server.HealthMonitoringPublic": false,
"Server.Hostname": false,
"Server.IssuerHostname": false,
"Server.IssuerJwks": false,
"Server.IssuerPort": false,
"Server.IssuerUrl": false,
"Server.Modules": false,
"Server.RegistrationRetryInterval": false,
"Server.SessionSecretFile": false,
"Server.StartupTimeout": false,
"Server.TLSCACertificateDirectory": false,
"Server.TLSCACertificateFile": false,
"Server.TLSCAKey": false,
"Server.TLSCertificate": false,
"Server.TLSCertificateChain": false,
"Server.TLSKey": false,
"Server.UIActivationCodeFile": false,
"Server.UIAdminUsers": false,
"Server.UILoginRateLimit": false,
"Server.UIPasswordFile": false,
"Server.UnprivilegedUser": false,
"Server.WebConfigFile": false,
"Server.WebHost": false,
"Server.WebPort": false,
"Shoveler.AMQPExchange": false,
"Shoveler.AMQPTokenLocation": false,
"Shoveler.Enable": false,
"Shoveler.IPMapping": false,
"Shoveler.MessageQueueProtocol": false,
"Shoveler.OutputDestinations": false,
"Shoveler.PortHigher": false,
"Shoveler.PortLower": false,
"Shoveler.QueueDirectory": false,
"Shoveler.StompCert": false,
"Shoveler.StompCertKey": false,
"Shoveler.StompPassword": false,
"Shoveler.StompUsername": false,
"Shoveler.Topic": false,
"Shoveler.URL": false,
"Shoveler.VerifyHeader": false,
"StagePlugin.Hook": false,
"StagePlugin.MountPrefix": false,
"StagePlugin.OriginPrefix": false,
"StagePlugin.ShadowOriginPrefix": false,
"TLSSkipVerify": false,
"Topology.DisableCacheX509": false,
"Topology.DisableCaches": false,
"Topology.DisableDowntime": false,
"Topology.DisableOriginX509": false,
"Topology.DisableOrigins": false,
"Transport.BrokerEndpointCacheTTL": false,
"Transport.DialerKeepAlive": false,
"Transport.DialerTimeout": false,
"Transport.ExpectContinueTimeout": false,
"Transport.IdleConnTimeout": false,
"Transport.MaxIdleConns": false,
"Transport.ResponseHeaderTimeout": false,
"Transport.TLSHandshakeTimeout": false,
"Xrootd.AuthRefreshInterval": false,
"Xrootd.Authfile": false,
"Xrootd.AutoShutdownEnabled": false,
"Xrootd.ConfigFile": false,
"Xrootd.ConfigUpdateFailureTimeout": false,
"Xrootd.DetailedMonitoringHost": false,
"Xrootd.DetailedMonitoringPort": false,
"Xrootd.EnableLocalMonitoring": false,
"Xrootd.HttpMaxDelay": false,
"Xrootd.LocalMonitoringHost": false,
"Xrootd.MacaroonsKeyFile": false,
"Xrootd.ManagerHost": false,
"Xrootd.ManagerPort": false,
"Xrootd.MaxStartupWait": false,
"Xrootd.MaxThreads": false,
"Xrootd.Mount": false,
"Xrootd.Port": false,
"Xrootd.RobotsTxtFile": false,
"Xrootd.RunLocation": false,
"Xrootd.ScitokensConfig": false,
"Xrootd.ShutdownTimeout": false,
"Xrootd.Sitename": false,
"Xrootd.SummaryMonitoringHost": false,
"Xrootd.SummaryMonitoringPort": false,
}
func GetRuntimeConfigurable() map[string]bool {
return runtimeConfigurableMap
}
// IsRuntimeConfigurable returns whether the given parameter name can be reloaded at runtime
func IsRuntimeConfigurable(paramName string) bool {
if val, ok := runtimeConfigurableMap[paramName]; ok {
return val
}
return false
}
func (sP StringParam) GetString() string {
config := getOrCreateConfig()
switch sP.name {
case "Cache.ClientStatisticsLocation":
return config.Cache.ClientStatisticsLocation
case "Cache.DataLocation":
return config.Cache.DataLocation
case "Cache.DbLocation":
return config.Cache.DbLocation
case "Cache.ExportLocation":
return config.Cache.ExportLocation
case "Cache.FedTokenLocation":
return config.Cache.FedTokenLocation
case "Cache.FilesBaseSize":
return config.Cache.FilesBaseSize
case "Cache.FilesMaxSize":
return config.Cache.FilesMaxSize
case "Cache.FilesNominalSize":
return config.Cache.FilesNominalSize
case "Cache.HighWaterMark":
return config.Cache.HighWaterMark
case "Cache.LocalRoot":
return config.Cache.LocalRoot
case "Cache.LowWatermark":
return config.Cache.LowWatermark
case "Cache.NamespaceLocation":
return config.Cache.NamespaceLocation
case "Cache.RunLocation":
return config.Cache.RunLocation
case "Cache.SentinelLocation":
return config.Cache.SentinelLocation
case "Cache.StorageLocation":
return config.Cache.StorageLocation
case "Cache.Url":
return config.Cache.Url
case "Cache.XRootDPrefix":
return config.Cache.XRootDPrefix
case "Director.AdvertiseUrl":
return config.Director.AdvertiseUrl
case "Director.CacheSortMethod":
return config.Director.CacheSortMethod
case "Director.DbLocation":
return config.Director.DbLocation
case "Director.DefaultResponse":
return config.Director.DefaultResponse
case "Director.GeoIPLocation":
return config.Director.GeoIPLocation
case "Director.MaxMindKey":
return config.Director.MaxMindKey
case "Director.MaxMindKeyFile":
return config.Director.MaxMindKeyFile
case "Director.SupportContactEmail":
return config.Director.SupportContactEmail
case "Director.SupportContactUrl":
return config.Director.SupportContactUrl
case "Federation.DiscoveryUrl":
return config.Federation.DiscoveryUrl
case "Federation.TopologyDowntimeUrl":
return config.Federation.TopologyDowntimeUrl
case "Federation.TopologyNamespaceUrl":
return config.Federation.TopologyNamespaceUrl
case "Federation.TopologyUrl":
return config.Federation.TopologyUrl
case "IssuerKey":
return config.IssuerKey
case "IssuerKeysDirectory":
return config.IssuerKeysDirectory
case "Issuer.AuthenticationSource":
return config.Issuer.AuthenticationSource
case "Issuer.GroupFile":
return config.Issuer.GroupFile
case "Issuer.GroupSource":
return config.Issuer.GroupSource
case "Issuer.IssuerClaimValue":
return config.Issuer.IssuerClaimValue
case "Issuer.OIDCAuthenticationUserClaim":
return config.Issuer.OIDCAuthenticationUserClaim
case "Issuer.OIDCGroupClaim":
return config.Issuer.OIDCGroupClaim
case "Issuer.QDLLocation":
return config.Issuer.QDLLocation
case "Issuer.ScitokensServerLocation":
return config.Issuer.ScitokensServerLocation
case "Issuer.TomcatLocation":
return config.Issuer.TomcatLocation
case "LocalCache.DataLocation":
return config.LocalCache.DataLocation
case "LocalCache.RunLocation":
return config.LocalCache.RunLocation
case "LocalCache.Size":
return config.LocalCache.Size
case "LocalCache.Socket":
return config.LocalCache.Socket
case "Logging.Cache.Http":
return config.Logging.Cache.Http
case "Logging.Cache.Ofs":
return config.Logging.Cache.Ofs
case "Logging.Cache.Pfc":
return config.Logging.Cache.Pfc
case "Logging.Cache.Pss":
return config.Logging.Cache.Pss
case "Logging.Cache.PssSetOpt":
return config.Logging.Cache.PssSetOpt
case "Logging.Cache.Scitokens":
return config.Logging.Cache.Scitokens
case "Logging.Cache.Xrd":
return config.Logging.Cache.Xrd
case "Logging.Cache.Xrootd":
return config.Logging.Cache.Xrootd
case "Logging.Level":
return config.Logging.Level
case "Logging.LogLocation":
return config.Logging.LogLocation
case "Logging.Origin.Cms":
return config.Logging.Origin.Cms
case "Logging.Origin.Http":
return config.Logging.Origin.Http
case "Logging.Origin.Ofs":
return config.Logging.Origin.Ofs
case "Logging.Origin.Oss":
return config.Logging.Origin.Oss
case "Logging.Origin.Scitokens":
return config.Logging.Origin.Scitokens
case "Logging.Origin.Xrd":
return config.Logging.Origin.Xrd
case "Logging.Origin.Xrootd":
return config.Logging.Origin.Xrootd
case "Lotman.DbLocation":
return config.Lotman.DbLocation
case "Lotman.EnabledPolicy":
return config.Lotman.EnabledPolicy
case "Lotman.LibLocation":
return config.Lotman.LibLocation
case "Lotman.LotHome":
return config.Lotman.LotHome
case "Monitoring.DataLocation":
return config.Monitoring.DataLocation
case "Monitoring.DataRetentionSize":
return config.Monitoring.DataRetentionSize
case "OIDC.AuthorizationEndpoint":
return config.OIDC.AuthorizationEndpoint
case "OIDC.ClientID":
return config.OIDC.ClientID
case "OIDC.ClientIDFile":
return config.OIDC.ClientIDFile
case "OIDC.ClientRedirectHostname":
return config.OIDC.ClientRedirectHostname
case "OIDC.ClientSecretFile":
return config.OIDC.ClientSecretFile
case "OIDC.DeviceAuthEndpoint":
return config.OIDC.DeviceAuthEndpoint
case "OIDC.Issuer":
return config.OIDC.Issuer
case "OIDC.TokenEndpoint":
return config.OIDC.TokenEndpoint
case "OIDC.UserInfoEndpoint":
return config.OIDC.UserInfoEndpoint
case "Origin.DbLocation":
return config.Origin.DbLocation
case "Origin.ExportVolume":
return config.Origin.ExportVolume
case "Origin.FedTokenLocation":
return config.Origin.FedTokenLocation
case "Origin.FederationPrefix":
return config.Origin.FederationPrefix
case "Origin.GlobusClientIDFile":
return config.Origin.GlobusClientIDFile
case "Origin.GlobusClientSecretFile":
return config.Origin.GlobusClientSecretFile
case "Origin.GlobusCollectionID":
return config.Origin.GlobusCollectionID
case "Origin.GlobusCollectionName":
return config.Origin.GlobusCollectionName
case "Origin.GlobusConfigLocation":
return config.Origin.GlobusConfigLocation
case "Origin.HttpAuthTokenFile":
return config.Origin.HttpAuthTokenFile
case "Origin.HttpServiceUrl":
return config.Origin.HttpServiceUrl
case "Origin.Mode":
return config.Origin.Mode
case "Origin.NamespacePrefix":
return config.Origin.NamespacePrefix
case "Origin.RunLocation":
return config.Origin.RunLocation
case "Origin.S3AccessKeyfile":
return config.Origin.S3AccessKeyfile
case "Origin.S3Bucket":
return config.Origin.S3Bucket
case "Origin.S3Region":
return config.Origin.S3Region
case "Origin.S3SecretKeyfile":
return config.Origin.S3SecretKeyfile
case "Origin.S3ServiceName":
return config.Origin.S3ServiceName
case "Origin.S3ServiceUrl":
return config.Origin.S3ServiceUrl
case "Origin.S3UrlStyle":
return config.Origin.S3UrlStyle
case "Origin.ScitokensDefaultUser":
return config.Origin.ScitokensDefaultUser
case "Origin.ScitokensNameMapFile":
return config.Origin.ScitokensNameMapFile
case "Origin.ScitokensUsernameClaim":
return config.Origin.ScitokensUsernameClaim
case "Origin.StoragePrefix":
return config.Origin.StoragePrefix
case "Origin.StorageType":
return config.Origin.StorageType
case "Origin.TokenAudience":
return config.Origin.TokenAudience
case "Origin.Url":
return config.Origin.Url
case "Origin.XRootDPrefix":
return config.Origin.XRootDPrefix
case "Origin.XRootServiceUrl":
return config.Origin.XRootServiceUrl
case "Plugin.Token":
return config.Plugin.Token
case "Registry.DbLocation":
return config.Registry.DbLocation
case "Registry.InstitutionsUrl":
return config.Registry.InstitutionsUrl
case "RuntimeDir":
return config.RuntimeDir
case "Server.DbLocation":
return config.Server.DbLocation
case "Server.ExternalWebUrl":
return config.Server.ExternalWebUrl
case "Server.Hostname":
return config.Server.Hostname
case "Server.IssuerHostname":
return config.Server.IssuerHostname
case "Server.IssuerJwks":
return config.Server.IssuerJwks
case "Server.IssuerUrl":
return config.Server.IssuerUrl
case "Server.SessionSecretFile":
return config.Server.SessionSecretFile
case "Server.TLSCACertificateDirectory":
return config.Server.TLSCACertificateDirectory
case "Server.TLSCACertificateFile":
return config.Server.TLSCACertificateFile
case "Server.TLSCAKey":
return config.Server.TLSCAKey
case "Server.TLSCertificate":
return config.Server.TLSCertificate
case "Server.TLSCertificateChain":
return config.Server.TLSCertificateChain
case "Server.TLSKey":
return config.Server.TLSKey
case "Server.UIActivationCodeFile":
return config.Server.UIActivationCodeFile
case "Server.UIPasswordFile":
return config.Server.UIPasswordFile
case "Server.UnprivilegedUser":
return config.Server.UnprivilegedUser
case "Server.WebConfigFile":
return config.Server.WebConfigFile
case "Server.WebHost":
return config.Server.WebHost
case "Shoveler.AMQPExchange":
return config.Shoveler.AMQPExchange
case "Shoveler.AMQPTokenLocation":
return config.Shoveler.AMQPTokenLocation
case "Shoveler.MessageQueueProtocol":
return config.Shoveler.MessageQueueProtocol
case "Shoveler.QueueDirectory":
return config.Shoveler.QueueDirectory
case "Shoveler.StompCert":
return config.Shoveler.StompCert
case "Shoveler.StompCertKey":
return config.Shoveler.StompCertKey
case "Shoveler.StompPassword":
return config.Shoveler.StompPassword
case "Shoveler.StompUsername":
return config.Shoveler.StompUsername
case "Shoveler.Topic":
return config.Shoveler.Topic
case "Shoveler.URL":
return config.Shoveler.URL
case "StagePlugin.MountPrefix":
return config.StagePlugin.MountPrefix
case "StagePlugin.OriginPrefix":
return config.StagePlugin.OriginPrefix
case "StagePlugin.ShadowOriginPrefix":
return config.StagePlugin.ShadowOriginPrefix
case "Xrootd.Authfile":
return config.Xrootd.Authfile
case "Xrootd.ConfigFile":
return config.Xrootd.ConfigFile
case "Xrootd.DetailedMonitoringHost":
return config.Xrootd.DetailedMonitoringHost
case "Xrootd.LocalMonitoringHost":
return config.Xrootd.LocalMonitoringHost
case "Xrootd.MacaroonsKeyFile":
return config.Xrootd.MacaroonsKeyFile
case "Xrootd.ManagerHost":
return config.Xrootd.ManagerHost
case "Xrootd.Mount":
return config.Xrootd.Mount
case "Xrootd.RobotsTxtFile":
return config.Xrootd.RobotsTxtFile
case "Xrootd.RunLocation":
return config.Xrootd.RunLocation
case "Xrootd.ScitokensConfig":
return config.Xrootd.ScitokensConfig
case "Xrootd.Sitename":
return config.Xrootd.Sitename
case "Xrootd.SummaryMonitoringHost":
return config.Xrootd.SummaryMonitoringHost
}
return ""
}
func (sP StringParam) GetName() string {
return sP.name
}
func (sP StringParam) IsSet() bool {
return viper.IsSet(sP.name)
}
func (sP StringParam) IsRuntimeConfigurable() bool {
return IsRuntimeConfigurable(sP.name)
}
func (slP StringSliceParam) GetStringSlice() []string {
config := getOrCreateConfig()
switch slP.name {
case "Cache.DataLocations":
return config.Cache.DataLocations
case "Cache.MetaLocations":
return config.Cache.MetaLocations
case "Cache.PermittedNamespaces":
return config.Cache.PermittedNamespaces
case "Client.PreferredCaches":
return config.Client.PreferredCaches
case "ConfigLocations":
return config.ConfigLocations
case "Director.CacheResponseHostnames":
return config.Director.CacheResponseHostnames
case "Director.FilteredServers":
return config.Director.FilteredServers
case "Director.OriginResponseHostnames":
return config.Director.OriginResponseHostnames
case "Issuer.GroupRequirements":
return config.Issuer.GroupRequirements
case "Issuer.RedirectUris":
return config.Issuer.RedirectUris
case "Monitoring.AggregatePrefixes":
return config.Monitoring.AggregatePrefixes
case "OIDC.Scopes":
return config.OIDC.Scopes
case "Origin.ExportVolumes":
return config.Origin.ExportVolumes
case "Origin.ScitokensRestrictedPaths":
return config.Origin.ScitokensRestrictedPaths
case "Registry.AdminUsers":
return config.Registry.AdminUsers
case "Server.DirectorUrls":
return config.Server.DirectorUrls
case "Server.Modules":
return config.Server.Modules
case "Server.UIAdminUsers":
return config.Server.UIAdminUsers
case "Shoveler.OutputDestinations":
return config.Shoveler.OutputDestinations
}
return nil
}
func (slP StringSliceParam) GetName() string {
return slP.name
}
func (slP StringSliceParam) IsSet() bool {
return viper.IsSet(slP.name)
}
func (slP StringSliceParam) IsRuntimeConfigurable() bool {
return IsRuntimeConfigurable(slP.name)
}
func (iP IntParam) GetInt() int {
config := getOrCreateConfig()
switch iP.name {
case "Cache.BlocksToPrefetch":
return config.Cache.BlocksToPrefetch
case "Cache.Concurrency":
return config.Cache.Concurrency
case "Cache.ConcurrencyDegradedThreshold":
return config.Cache.ConcurrencyDegradedThreshold
case "Cache.EvictionMonitoringMaxDepth":
return config.Cache.EvictionMonitoringMaxDepth
case "Cache.Port":
return config.Cache.Port
case "Client.DirectorRetries":
return config.Client.DirectorRetries
case "Client.MaximumDownloadSpeed":
return config.Client.MaximumDownloadSpeed
case "Client.MinimumDownloadSpeed":
return config.Client.MinimumDownloadSpeed
case "Client.WorkerCount":
return config.Client.WorkerCount
case "Director.AdaptiveSortTruncateConstant":
return config.Director.AdaptiveSortTruncateConstant
case "Director.CachePresenceCapacity":
return config.Director.CachePresenceCapacity
case "Director.MaxStatResponse":
return config.Director.MaxStatResponse
case "Director.MinStatResponse":
return config.Director.MinStatResponse
case "Director.StatConcurrencyLimit":
return config.Director.StatConcurrencyLimit
case "LocalCache.HighWaterMarkPercentage":
return config.LocalCache.HighWaterMarkPercentage
case "LocalCache.LowWaterMarkPercentage":
return config.LocalCache.LowWaterMarkPercentage
case "MinimumDownloadSpeed":
return config.MinimumDownloadSpeed
case "Monitoring.LabelLimit":
return config.Monitoring.LabelLimit
case "Monitoring.LabelNameLengthLimit":
return config.Monitoring.LabelNameLengthLimit
case "Monitoring.LabelValueLengthLimit":
return config.Monitoring.LabelValueLengthLimit
case "Monitoring.PortHigher":
return config.Monitoring.PortHigher
case "Monitoring.PortLower":
return config.Monitoring.PortLower
case "Monitoring.SampleLimit":
return config.Monitoring.SampleLimit
case "Origin.Concurrency":
return config.Origin.Concurrency
case "Origin.ConcurrencyDegradedThreshold":
return config.Origin.ConcurrencyDegradedThreshold
case "Origin.Port":
return config.Origin.Port
case "Server.IssuerPort":
return config.Server.IssuerPort
case "Server.UILoginRateLimit":
return config.Server.UILoginRateLimit
case "Server.WebPort":
return config.Server.WebPort
case "Shoveler.PortHigher":
return config.Shoveler.PortHigher
case "Shoveler.PortLower":
return config.Shoveler.PortLower
case "Transport.MaxIdleConns":
return config.Transport.MaxIdleConns
case "Xrootd.DetailedMonitoringPort":
return config.Xrootd.DetailedMonitoringPort
case "Xrootd.ManagerPort":
return config.Xrootd.ManagerPort
case "Xrootd.MaxThreads":
return config.Xrootd.MaxThreads
case "Xrootd.Port":
return config.Xrootd.Port
case "Xrootd.SummaryMonitoringPort":
return config.Xrootd.SummaryMonitoringPort
}
return 0
}
func (iP IntParam) GetName() string {
return iP.name
}
func (iP IntParam) IsSet() bool {
return viper.IsSet(iP.name)
}
func (iP IntParam) IsRuntimeConfigurable() bool {
return IsRuntimeConfigurable(iP.name)
}
func (bP BoolParam) GetBool() bool {
config := getOrCreateConfig()
switch bP.name {
case "Cache.EnableBroker":
return config.Cache.EnableBroker
case "Cache.EnableEvictionMonitoring":
return config.Cache.EnableEvictionMonitoring
case "Cache.EnableLotman":
return config.Cache.EnableLotman
case "Cache.EnableOIDC":
return config.Cache.EnableOIDC
case "Cache.EnablePrefetch":
return config.Cache.EnablePrefetch
case "Cache.EnableSiteLocalMode":
return config.Cache.EnableSiteLocalMode
case "Cache.EnableTLSClientAuth":
return config.Cache.EnableTLSClientAuth
case "Cache.EnableVoms":
return config.Cache.EnableVoms
case "Cache.SelfTest":
return config.Cache.SelfTest
case "Client.AssumeDirectorServerHeader":
return config.Client.AssumeDirectorServerHeader
case "Client.DisableHttpProxy":
return config.Client.DisableHttpProxy
case "Client.DisableProxyFallback":
return config.Client.DisableProxyFallback
case "Client.EnableOverwrites":
return config.Client.EnableOverwrites
case "Client.IsPlugin":
return config.Client.IsPlugin
case "Debug":
return config.Debug
case "Director.AssumePresenceAtSingleOrigin":
return config.Director.AssumePresenceAtSingleOrigin
case "Director.CachesPullFromCaches":
return config.Director.CachesPullFromCaches
case "Director.CheckCachePresence":
return config.Director.CheckCachePresence
case "Director.CheckOriginPresence":
return config.Director.CheckOriginPresence
case "Director.EnableBroker":
return config.Director.EnableBroker
case "Director.EnableOIDC":
return config.Director.EnableOIDC
case "Director.EnableStat":
return config.Director.EnableStat
case "Director.FilterCachesInErrorState":
return config.Director.FilterCachesInErrorState
case "DisableHttpProxy":
return config.DisableHttpProxy
case "DisableProxyFallback":
return config.DisableProxyFallback
case "Issuer.OIDCPreferClaimsFromIDToken":
return config.Issuer.OIDCPreferClaimsFromIDToken
case "Issuer.UserStripDomain":
return config.Issuer.UserStripDomain
case "Logging.DisableProgressBars":
return config.Logging.DisableProgressBars
case "Lotman.EnableAPI":
return config.Lotman.EnableAPI
case "Monitoring.EnablePrometheus":
return config.Monitoring.EnablePrometheus
case "Monitoring.MetricAuthorization":
return config.Monitoring.MetricAuthorization
case "Monitoring.PromQLAuthorization":
return config.Monitoring.PromQLAuthorization
case "Origin.DirectorTest":
return config.Origin.DirectorTest
case "Origin.DisableDirectClients":
return config.Origin.DisableDirectClients
case "Origin.EnableBroker":
return config.Origin.EnableBroker
case "Origin.EnableCmsd":
return config.Origin.EnableCmsd
case "Origin.EnableDirListing":
return config.Origin.EnableDirListing
case "Origin.EnableDirectReads":
return config.Origin.EnableDirectReads
case "Origin.EnableFallbackRead":
return config.Origin.EnableFallbackRead
case "Origin.EnableIssuer":
return config.Origin.EnableIssuer
case "Origin.EnableListings":
return config.Origin.EnableListings
case "Origin.EnableMacaroons":
return config.Origin.EnableMacaroons
case "Origin.EnableOIDC":
return config.Origin.EnableOIDC
case "Origin.EnablePublicReads":
return config.Origin.EnablePublicReads
case "Origin.EnableReads":
return config.Origin.EnableReads
case "Origin.EnableVoms":
return config.Origin.EnableVoms
case "Origin.EnableWrite":
return config.Origin.EnableWrite
case "Origin.EnableWrites":