github.com/palantir/witchcraft-go-server/v2@v2.76.0/config/zz_generated_refreshables.go (about) 1 // Generated by godel-refreshable-plugin: do not edit. 2 3 package config 4 5 import ( 6 httpclient "github.com/palantir/conjure-go-runtime/v2/conjure-go-client/httpclient" 7 refreshable "github.com/palantir/pkg/refreshable" 8 wlog "github.com/palantir/witchcraft-go-logging/wlog" 9 ) 10 11 type RefreshableRuntime interface { 12 refreshable.Refreshable 13 CurrentRuntime() Runtime 14 MapRuntime(func(Runtime) interface{}) refreshable.Refreshable 15 SubscribeToRuntime(func(Runtime)) (unsubscribe func()) 16 17 DiagnosticsConfig() RefreshableDiagnosticsConfig 18 HealthChecks() RefreshableHealthChecksConfig 19 LoggerConfig() RefreshableLoggerConfigPtr 20 ServiceDiscovery() RefreshableServicesConfig 21 } 22 23 type RefreshingRuntime struct { 24 refreshable.Refreshable 25 } 26 27 func NewRefreshingRuntime(in refreshable.Refreshable) RefreshingRuntime { 28 return RefreshingRuntime{Refreshable: in} 29 } 30 31 func (r RefreshingRuntime) CurrentRuntime() Runtime { 32 return r.Current().(Runtime) 33 } 34 35 func (r RefreshingRuntime) MapRuntime(mapFn func(Runtime) interface{}) refreshable.Refreshable { 36 return r.Map(func(i interface{}) interface{} { 37 return mapFn(i.(Runtime)) 38 }) 39 } 40 41 func (r RefreshingRuntime) SubscribeToRuntime(consumer func(Runtime)) (unsubscribe func()) { 42 return r.Subscribe(func(i interface{}) { 43 consumer(i.(Runtime)) 44 }) 45 } 46 47 func (r RefreshingRuntime) DiagnosticsConfig() RefreshableDiagnosticsConfig { 48 return NewRefreshingDiagnosticsConfig(r.MapRuntime(func(i Runtime) interface{} { 49 return i.DiagnosticsConfig 50 })) 51 } 52 53 func (r RefreshingRuntime) HealthChecks() RefreshableHealthChecksConfig { 54 return NewRefreshingHealthChecksConfig(r.MapRuntime(func(i Runtime) interface{} { 55 return i.HealthChecks 56 })) 57 } 58 59 func (r RefreshingRuntime) LoggerConfig() RefreshableLoggerConfigPtr { 60 return NewRefreshingLoggerConfigPtr(r.MapRuntime(func(i Runtime) interface{} { 61 return i.LoggerConfig 62 })) 63 } 64 65 func (r RefreshingRuntime) ServiceDiscovery() RefreshableServicesConfig { 66 return NewRefreshingServicesConfig(r.MapRuntime(func(i Runtime) interface{} { 67 return i.ServiceDiscovery 68 })) 69 } 70 71 type RefreshableDiagnosticsConfig interface { 72 refreshable.Refreshable 73 CurrentDiagnosticsConfig() DiagnosticsConfig 74 MapDiagnosticsConfig(func(DiagnosticsConfig) interface{}) refreshable.Refreshable 75 SubscribeToDiagnosticsConfig(func(DiagnosticsConfig)) (unsubscribe func()) 76 77 DebugSharedSecret() refreshable.String 78 DebugSharedSecretFile() refreshable.String 79 } 80 81 type RefreshingDiagnosticsConfig struct { 82 refreshable.Refreshable 83 } 84 85 func NewRefreshingDiagnosticsConfig(in refreshable.Refreshable) RefreshingDiagnosticsConfig { 86 return RefreshingDiagnosticsConfig{Refreshable: in} 87 } 88 89 func (r RefreshingDiagnosticsConfig) CurrentDiagnosticsConfig() DiagnosticsConfig { 90 return r.Current().(DiagnosticsConfig) 91 } 92 93 func (r RefreshingDiagnosticsConfig) MapDiagnosticsConfig(mapFn func(DiagnosticsConfig) interface{}) refreshable.Refreshable { 94 return r.Map(func(i interface{}) interface{} { 95 return mapFn(i.(DiagnosticsConfig)) 96 }) 97 } 98 99 func (r RefreshingDiagnosticsConfig) SubscribeToDiagnosticsConfig(consumer func(DiagnosticsConfig)) (unsubscribe func()) { 100 return r.Subscribe(func(i interface{}) { 101 consumer(i.(DiagnosticsConfig)) 102 }) 103 } 104 105 func (r RefreshingDiagnosticsConfig) DebugSharedSecret() refreshable.String { 106 return refreshable.NewString(r.MapDiagnosticsConfig(func(i DiagnosticsConfig) interface{} { 107 return i.DebugSharedSecret 108 })) 109 } 110 111 func (r RefreshingDiagnosticsConfig) DebugSharedSecretFile() refreshable.String { 112 return refreshable.NewString(r.MapDiagnosticsConfig(func(i DiagnosticsConfig) interface{} { 113 return i.DebugSharedSecretFile 114 })) 115 } 116 117 type RefreshableHealthChecksConfig interface { 118 refreshable.Refreshable 119 CurrentHealthChecksConfig() HealthChecksConfig 120 MapHealthChecksConfig(func(HealthChecksConfig) interface{}) refreshable.Refreshable 121 SubscribeToHealthChecksConfig(func(HealthChecksConfig)) (unsubscribe func()) 122 123 SharedSecret() refreshable.String 124 } 125 126 type RefreshingHealthChecksConfig struct { 127 refreshable.Refreshable 128 } 129 130 func NewRefreshingHealthChecksConfig(in refreshable.Refreshable) RefreshingHealthChecksConfig { 131 return RefreshingHealthChecksConfig{Refreshable: in} 132 } 133 134 func (r RefreshingHealthChecksConfig) CurrentHealthChecksConfig() HealthChecksConfig { 135 return r.Current().(HealthChecksConfig) 136 } 137 138 func (r RefreshingHealthChecksConfig) MapHealthChecksConfig(mapFn func(HealthChecksConfig) interface{}) refreshable.Refreshable { 139 return r.Map(func(i interface{}) interface{} { 140 return mapFn(i.(HealthChecksConfig)) 141 }) 142 } 143 144 func (r RefreshingHealthChecksConfig) SubscribeToHealthChecksConfig(consumer func(HealthChecksConfig)) (unsubscribe func()) { 145 return r.Subscribe(func(i interface{}) { 146 consumer(i.(HealthChecksConfig)) 147 }) 148 } 149 150 func (r RefreshingHealthChecksConfig) SharedSecret() refreshable.String { 151 return refreshable.NewString(r.MapHealthChecksConfig(func(i HealthChecksConfig) interface{} { 152 return i.SharedSecret 153 })) 154 } 155 156 type RefreshableLoggerConfigPtr interface { 157 refreshable.Refreshable 158 CurrentLoggerConfigPtr() *LoggerConfig 159 MapLoggerConfigPtr(func(*LoggerConfig) interface{}) refreshable.Refreshable 160 SubscribeToLoggerConfigPtr(func(*LoggerConfig)) (unsubscribe func()) 161 162 Level() RefreshableLogLevel 163 } 164 165 type RefreshingLoggerConfigPtr struct { 166 refreshable.Refreshable 167 } 168 169 func NewRefreshingLoggerConfigPtr(in refreshable.Refreshable) RefreshingLoggerConfigPtr { 170 return RefreshingLoggerConfigPtr{Refreshable: in} 171 } 172 173 func (r RefreshingLoggerConfigPtr) CurrentLoggerConfigPtr() *LoggerConfig { 174 return r.Current().(*LoggerConfig) 175 } 176 177 func (r RefreshingLoggerConfigPtr) MapLoggerConfigPtr(mapFn func(*LoggerConfig) interface{}) refreshable.Refreshable { 178 return r.Map(func(i interface{}) interface{} { 179 return mapFn(i.(*LoggerConfig)) 180 }) 181 } 182 183 func (r RefreshingLoggerConfigPtr) SubscribeToLoggerConfigPtr(consumer func(*LoggerConfig)) (unsubscribe func()) { 184 return r.Subscribe(func(i interface{}) { 185 consumer(i.(*LoggerConfig)) 186 }) 187 } 188 189 func (r RefreshingLoggerConfigPtr) Level() RefreshableLogLevel { 190 return NewRefreshingLogLevel(r.MapLoggerConfigPtr(func(i *LoggerConfig) interface{} { 191 return i.Level 192 })) 193 } 194 195 type RefreshableLoggerConfig interface { 196 refreshable.Refreshable 197 CurrentLoggerConfig() LoggerConfig 198 MapLoggerConfig(func(LoggerConfig) interface{}) refreshable.Refreshable 199 SubscribeToLoggerConfig(func(LoggerConfig)) (unsubscribe func()) 200 201 Level() RefreshableLogLevel 202 } 203 204 type RefreshingLoggerConfig struct { 205 refreshable.Refreshable 206 } 207 208 func NewRefreshingLoggerConfig(in refreshable.Refreshable) RefreshingLoggerConfig { 209 return RefreshingLoggerConfig{Refreshable: in} 210 } 211 212 func (r RefreshingLoggerConfig) CurrentLoggerConfig() LoggerConfig { 213 return r.Current().(LoggerConfig) 214 } 215 216 func (r RefreshingLoggerConfig) MapLoggerConfig(mapFn func(LoggerConfig) interface{}) refreshable.Refreshable { 217 return r.Map(func(i interface{}) interface{} { 218 return mapFn(i.(LoggerConfig)) 219 }) 220 } 221 222 func (r RefreshingLoggerConfig) SubscribeToLoggerConfig(consumer func(LoggerConfig)) (unsubscribe func()) { 223 return r.Subscribe(func(i interface{}) { 224 consumer(i.(LoggerConfig)) 225 }) 226 } 227 228 func (r RefreshingLoggerConfig) Level() RefreshableLogLevel { 229 return NewRefreshingLogLevel(r.MapLoggerConfig(func(i LoggerConfig) interface{} { 230 return i.Level 231 })) 232 } 233 234 type RefreshableLogLevel interface { 235 refreshable.Refreshable 236 CurrentLogLevel() wlog.LogLevel 237 MapLogLevel(func(wlog.LogLevel) interface{}) refreshable.Refreshable 238 SubscribeToLogLevel(func(wlog.LogLevel)) (unsubscribe func()) 239 } 240 241 type RefreshingLogLevel struct { 242 refreshable.Refreshable 243 } 244 245 func NewRefreshingLogLevel(in refreshable.Refreshable) RefreshingLogLevel { 246 return RefreshingLogLevel{Refreshable: in} 247 } 248 249 func (r RefreshingLogLevel) CurrentLogLevel() wlog.LogLevel { 250 return r.Current().(wlog.LogLevel) 251 } 252 253 func (r RefreshingLogLevel) MapLogLevel(mapFn func(wlog.LogLevel) interface{}) refreshable.Refreshable { 254 return r.Map(func(i interface{}) interface{} { 255 return mapFn(i.(wlog.LogLevel)) 256 }) 257 } 258 259 func (r RefreshingLogLevel) SubscribeToLogLevel(consumer func(wlog.LogLevel)) (unsubscribe func()) { 260 return r.Subscribe(func(i interface{}) { 261 consumer(i.(wlog.LogLevel)) 262 }) 263 } 264 265 type RefreshableServicesConfig interface { 266 refreshable.Refreshable 267 CurrentServicesConfig() httpclient.ServicesConfig 268 MapServicesConfig(func(httpclient.ServicesConfig) interface{}) refreshable.Refreshable 269 SubscribeToServicesConfig(func(httpclient.ServicesConfig)) (unsubscribe func()) 270 271 Default() RefreshableClientConfig 272 Services() RefreshableStringToClientConfig 273 } 274 275 type RefreshingServicesConfig struct { 276 refreshable.Refreshable 277 } 278 279 func NewRefreshingServicesConfig(in refreshable.Refreshable) RefreshingServicesConfig { 280 return RefreshingServicesConfig{Refreshable: in} 281 } 282 283 func (r RefreshingServicesConfig) CurrentServicesConfig() httpclient.ServicesConfig { 284 return r.Current().(httpclient.ServicesConfig) 285 } 286 287 func (r RefreshingServicesConfig) MapServicesConfig(mapFn func(httpclient.ServicesConfig) interface{}) refreshable.Refreshable { 288 return r.Map(func(i interface{}) interface{} { 289 return mapFn(i.(httpclient.ServicesConfig)) 290 }) 291 } 292 293 func (r RefreshingServicesConfig) SubscribeToServicesConfig(consumer func(httpclient.ServicesConfig)) (unsubscribe func()) { 294 return r.Subscribe(func(i interface{}) { 295 consumer(i.(httpclient.ServicesConfig)) 296 }) 297 } 298 299 func (r RefreshingServicesConfig) Default() RefreshableClientConfig { 300 return NewRefreshingClientConfig(r.MapServicesConfig(func(i httpclient.ServicesConfig) interface{} { 301 return i.Default 302 })) 303 } 304 305 func (r RefreshingServicesConfig) Services() RefreshableStringToClientConfig { 306 return NewRefreshingStringToClientConfig(r.MapServicesConfig(func(i httpclient.ServicesConfig) interface{} { 307 return i.Services 308 })) 309 } 310 311 type RefreshableClientConfig interface { 312 refreshable.Refreshable 313 CurrentClientConfig() httpclient.ClientConfig 314 MapClientConfig(func(httpclient.ClientConfig) interface{}) refreshable.Refreshable 315 SubscribeToClientConfig(func(httpclient.ClientConfig)) (unsubscribe func()) 316 317 ServiceName() refreshable.String 318 URIs() refreshable.StringSlice 319 APIToken() refreshable.StringPtr 320 APITokenFile() refreshable.StringPtr 321 BasicAuth() RefreshableBasicAuthPtr 322 DisableHTTP2() refreshable.BoolPtr 323 ProxyFromEnvironment() refreshable.BoolPtr 324 ProxyURL() refreshable.StringPtr 325 MaxNumRetries() refreshable.IntPtr 326 InitialBackoff() refreshable.DurationPtr 327 MaxBackoff() refreshable.DurationPtr 328 ConnectTimeout() refreshable.DurationPtr 329 ReadTimeout() refreshable.DurationPtr 330 WriteTimeout() refreshable.DurationPtr 331 IdleConnTimeout() refreshable.DurationPtr 332 TLSHandshakeTimeout() refreshable.DurationPtr 333 ExpectContinueTimeout() refreshable.DurationPtr 334 HTTP2ReadIdleTimeout() refreshable.DurationPtr 335 HTTP2PingTimeout() refreshable.DurationPtr 336 MaxIdleConns() refreshable.IntPtr 337 MaxIdleConnsPerHost() refreshable.IntPtr 338 Metrics() RefreshableMetricsConfig 339 Security() RefreshableSecurityConfig 340 } 341 342 type RefreshingClientConfig struct { 343 refreshable.Refreshable 344 } 345 346 func NewRefreshingClientConfig(in refreshable.Refreshable) RefreshingClientConfig { 347 return RefreshingClientConfig{Refreshable: in} 348 } 349 350 func (r RefreshingClientConfig) CurrentClientConfig() httpclient.ClientConfig { 351 return r.Current().(httpclient.ClientConfig) 352 } 353 354 func (r RefreshingClientConfig) MapClientConfig(mapFn func(httpclient.ClientConfig) interface{}) refreshable.Refreshable { 355 return r.Map(func(i interface{}) interface{} { 356 return mapFn(i.(httpclient.ClientConfig)) 357 }) 358 } 359 360 func (r RefreshingClientConfig) SubscribeToClientConfig(consumer func(httpclient.ClientConfig)) (unsubscribe func()) { 361 return r.Subscribe(func(i interface{}) { 362 consumer(i.(httpclient.ClientConfig)) 363 }) 364 } 365 366 func (r RefreshingClientConfig) ServiceName() refreshable.String { 367 return refreshable.NewString(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 368 return i.ServiceName 369 })) 370 } 371 372 func (r RefreshingClientConfig) URIs() refreshable.StringSlice { 373 return refreshable.NewStringSlice(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 374 return i.URIs 375 })) 376 } 377 378 func (r RefreshingClientConfig) APIToken() refreshable.StringPtr { 379 return refreshable.NewStringPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 380 return i.APIToken 381 })) 382 } 383 384 func (r RefreshingClientConfig) APITokenFile() refreshable.StringPtr { 385 return refreshable.NewStringPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 386 return i.APITokenFile 387 })) 388 } 389 390 func (r RefreshingClientConfig) BasicAuth() RefreshableBasicAuthPtr { 391 return NewRefreshingBasicAuthPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 392 return i.BasicAuth 393 })) 394 } 395 396 func (r RefreshingClientConfig) DisableHTTP2() refreshable.BoolPtr { 397 return refreshable.NewBoolPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 398 return i.DisableHTTP2 399 })) 400 } 401 402 func (r RefreshingClientConfig) ProxyFromEnvironment() refreshable.BoolPtr { 403 return refreshable.NewBoolPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 404 return i.ProxyFromEnvironment 405 })) 406 } 407 408 func (r RefreshingClientConfig) ProxyURL() refreshable.StringPtr { 409 return refreshable.NewStringPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 410 return i.ProxyURL 411 })) 412 } 413 414 func (r RefreshingClientConfig) MaxNumRetries() refreshable.IntPtr { 415 return refreshable.NewIntPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 416 return i.MaxNumRetries 417 })) 418 } 419 420 func (r RefreshingClientConfig) InitialBackoff() refreshable.DurationPtr { 421 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 422 return i.InitialBackoff 423 })) 424 } 425 426 func (r RefreshingClientConfig) MaxBackoff() refreshable.DurationPtr { 427 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 428 return i.MaxBackoff 429 })) 430 } 431 432 func (r RefreshingClientConfig) ConnectTimeout() refreshable.DurationPtr { 433 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 434 return i.ConnectTimeout 435 })) 436 } 437 438 func (r RefreshingClientConfig) ReadTimeout() refreshable.DurationPtr { 439 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 440 return i.ReadTimeout 441 })) 442 } 443 444 func (r RefreshingClientConfig) WriteTimeout() refreshable.DurationPtr { 445 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 446 return i.WriteTimeout 447 })) 448 } 449 450 func (r RefreshingClientConfig) IdleConnTimeout() refreshable.DurationPtr { 451 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 452 return i.IdleConnTimeout 453 })) 454 } 455 456 func (r RefreshingClientConfig) TLSHandshakeTimeout() refreshable.DurationPtr { 457 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 458 return i.TLSHandshakeTimeout 459 })) 460 } 461 462 func (r RefreshingClientConfig) ExpectContinueTimeout() refreshable.DurationPtr { 463 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 464 return i.ExpectContinueTimeout 465 })) 466 } 467 468 func (r RefreshingClientConfig) HTTP2ReadIdleTimeout() refreshable.DurationPtr { 469 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 470 return i.HTTP2ReadIdleTimeout 471 })) 472 } 473 474 func (r RefreshingClientConfig) HTTP2PingTimeout() refreshable.DurationPtr { 475 return refreshable.NewDurationPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 476 return i.HTTP2PingTimeout 477 })) 478 } 479 480 func (r RefreshingClientConfig) MaxIdleConns() refreshable.IntPtr { 481 return refreshable.NewIntPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 482 return i.MaxIdleConns 483 })) 484 } 485 486 func (r RefreshingClientConfig) MaxIdleConnsPerHost() refreshable.IntPtr { 487 return refreshable.NewIntPtr(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 488 return i.MaxIdleConnsPerHost 489 })) 490 } 491 492 func (r RefreshingClientConfig) Metrics() RefreshableMetricsConfig { 493 return NewRefreshingMetricsConfig(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 494 return i.Metrics 495 })) 496 } 497 498 func (r RefreshingClientConfig) Security() RefreshableSecurityConfig { 499 return NewRefreshingSecurityConfig(r.MapClientConfig(func(i httpclient.ClientConfig) interface{} { 500 return i.Security 501 })) 502 } 503 504 type RefreshableBasicAuthPtr interface { 505 refreshable.Refreshable 506 CurrentBasicAuthPtr() *httpclient.BasicAuth 507 MapBasicAuthPtr(func(*httpclient.BasicAuth) interface{}) refreshable.Refreshable 508 SubscribeToBasicAuthPtr(func(*httpclient.BasicAuth)) (unsubscribe func()) 509 510 User() refreshable.String 511 Password() refreshable.String 512 } 513 514 type RefreshingBasicAuthPtr struct { 515 refreshable.Refreshable 516 } 517 518 func NewRefreshingBasicAuthPtr(in refreshable.Refreshable) RefreshingBasicAuthPtr { 519 return RefreshingBasicAuthPtr{Refreshable: in} 520 } 521 522 func (r RefreshingBasicAuthPtr) CurrentBasicAuthPtr() *httpclient.BasicAuth { 523 return r.Current().(*httpclient.BasicAuth) 524 } 525 526 func (r RefreshingBasicAuthPtr) MapBasicAuthPtr(mapFn func(*httpclient.BasicAuth) interface{}) refreshable.Refreshable { 527 return r.Map(func(i interface{}) interface{} { 528 return mapFn(i.(*httpclient.BasicAuth)) 529 }) 530 } 531 532 func (r RefreshingBasicAuthPtr) SubscribeToBasicAuthPtr(consumer func(*httpclient.BasicAuth)) (unsubscribe func()) { 533 return r.Subscribe(func(i interface{}) { 534 consumer(i.(*httpclient.BasicAuth)) 535 }) 536 } 537 538 func (r RefreshingBasicAuthPtr) User() refreshable.String { 539 return refreshable.NewString(r.MapBasicAuthPtr(func(i *httpclient.BasicAuth) interface{} { 540 return i.User 541 })) 542 } 543 544 func (r RefreshingBasicAuthPtr) Password() refreshable.String { 545 return refreshable.NewString(r.MapBasicAuthPtr(func(i *httpclient.BasicAuth) interface{} { 546 return i.Password 547 })) 548 } 549 550 type RefreshableBasicAuth interface { 551 refreshable.Refreshable 552 CurrentBasicAuth() httpclient.BasicAuth 553 MapBasicAuth(func(httpclient.BasicAuth) interface{}) refreshable.Refreshable 554 SubscribeToBasicAuth(func(httpclient.BasicAuth)) (unsubscribe func()) 555 556 User() refreshable.String 557 Password() refreshable.String 558 } 559 560 type RefreshingBasicAuth struct { 561 refreshable.Refreshable 562 } 563 564 func NewRefreshingBasicAuth(in refreshable.Refreshable) RefreshingBasicAuth { 565 return RefreshingBasicAuth{Refreshable: in} 566 } 567 568 func (r RefreshingBasicAuth) CurrentBasicAuth() httpclient.BasicAuth { 569 return r.Current().(httpclient.BasicAuth) 570 } 571 572 func (r RefreshingBasicAuth) MapBasicAuth(mapFn func(httpclient.BasicAuth) interface{}) refreshable.Refreshable { 573 return r.Map(func(i interface{}) interface{} { 574 return mapFn(i.(httpclient.BasicAuth)) 575 }) 576 } 577 578 func (r RefreshingBasicAuth) SubscribeToBasicAuth(consumer func(httpclient.BasicAuth)) (unsubscribe func()) { 579 return r.Subscribe(func(i interface{}) { 580 consumer(i.(httpclient.BasicAuth)) 581 }) 582 } 583 584 func (r RefreshingBasicAuth) User() refreshable.String { 585 return refreshable.NewString(r.MapBasicAuth(func(i httpclient.BasicAuth) interface{} { 586 return i.User 587 })) 588 } 589 590 func (r RefreshingBasicAuth) Password() refreshable.String { 591 return refreshable.NewString(r.MapBasicAuth(func(i httpclient.BasicAuth) interface{} { 592 return i.Password 593 })) 594 } 595 596 type RefreshableMetricsConfig interface { 597 refreshable.Refreshable 598 CurrentMetricsConfig() httpclient.MetricsConfig 599 MapMetricsConfig(func(httpclient.MetricsConfig) interface{}) refreshable.Refreshable 600 SubscribeToMetricsConfig(func(httpclient.MetricsConfig)) (unsubscribe func()) 601 602 Enabled() refreshable.BoolPtr 603 Tags() RefreshableStringToString 604 } 605 606 type RefreshingMetricsConfig struct { 607 refreshable.Refreshable 608 } 609 610 func NewRefreshingMetricsConfig(in refreshable.Refreshable) RefreshingMetricsConfig { 611 return RefreshingMetricsConfig{Refreshable: in} 612 } 613 614 func (r RefreshingMetricsConfig) CurrentMetricsConfig() httpclient.MetricsConfig { 615 return r.Current().(httpclient.MetricsConfig) 616 } 617 618 func (r RefreshingMetricsConfig) MapMetricsConfig(mapFn func(httpclient.MetricsConfig) interface{}) refreshable.Refreshable { 619 return r.Map(func(i interface{}) interface{} { 620 return mapFn(i.(httpclient.MetricsConfig)) 621 }) 622 } 623 624 func (r RefreshingMetricsConfig) SubscribeToMetricsConfig(consumer func(httpclient.MetricsConfig)) (unsubscribe func()) { 625 return r.Subscribe(func(i interface{}) { 626 consumer(i.(httpclient.MetricsConfig)) 627 }) 628 } 629 630 func (r RefreshingMetricsConfig) Enabled() refreshable.BoolPtr { 631 return refreshable.NewBoolPtr(r.MapMetricsConfig(func(i httpclient.MetricsConfig) interface{} { 632 return i.Enabled 633 })) 634 } 635 636 func (r RefreshingMetricsConfig) Tags() RefreshableStringToString { 637 return NewRefreshingStringToString(r.MapMetricsConfig(func(i httpclient.MetricsConfig) interface{} { 638 return i.Tags 639 })) 640 } 641 642 type RefreshableStringToString interface { 643 refreshable.Refreshable 644 CurrentStringToString() map[string]string 645 MapStringToString(func(map[string]string) interface{}) refreshable.Refreshable 646 SubscribeToStringToString(func(map[string]string)) (unsubscribe func()) 647 } 648 649 type RefreshingStringToString struct { 650 refreshable.Refreshable 651 } 652 653 func NewRefreshingStringToString(in refreshable.Refreshable) RefreshingStringToString { 654 return RefreshingStringToString{Refreshable: in} 655 } 656 657 func (r RefreshingStringToString) CurrentStringToString() map[string]string { 658 return r.Current().(map[string]string) 659 } 660 661 func (r RefreshingStringToString) MapStringToString(mapFn func(map[string]string) interface{}) refreshable.Refreshable { 662 return r.Map(func(i interface{}) interface{} { 663 return mapFn(i.(map[string]string)) 664 }) 665 } 666 667 func (r RefreshingStringToString) SubscribeToStringToString(consumer func(map[string]string)) (unsubscribe func()) { 668 return r.Subscribe(func(i interface{}) { 669 consumer(i.(map[string]string)) 670 }) 671 } 672 673 type RefreshableSecurityConfig interface { 674 refreshable.Refreshable 675 CurrentSecurityConfig() httpclient.SecurityConfig 676 MapSecurityConfig(func(httpclient.SecurityConfig) interface{}) refreshable.Refreshable 677 SubscribeToSecurityConfig(func(httpclient.SecurityConfig)) (unsubscribe func()) 678 679 CAFiles() refreshable.StringSlice 680 CertFile() refreshable.String 681 KeyFile() refreshable.String 682 } 683 684 type RefreshingSecurityConfig struct { 685 refreshable.Refreshable 686 } 687 688 func NewRefreshingSecurityConfig(in refreshable.Refreshable) RefreshingSecurityConfig { 689 return RefreshingSecurityConfig{Refreshable: in} 690 } 691 692 func (r RefreshingSecurityConfig) CurrentSecurityConfig() httpclient.SecurityConfig { 693 return r.Current().(httpclient.SecurityConfig) 694 } 695 696 func (r RefreshingSecurityConfig) MapSecurityConfig(mapFn func(httpclient.SecurityConfig) interface{}) refreshable.Refreshable { 697 return r.Map(func(i interface{}) interface{} { 698 return mapFn(i.(httpclient.SecurityConfig)) 699 }) 700 } 701 702 func (r RefreshingSecurityConfig) SubscribeToSecurityConfig(consumer func(httpclient.SecurityConfig)) (unsubscribe func()) { 703 return r.Subscribe(func(i interface{}) { 704 consumer(i.(httpclient.SecurityConfig)) 705 }) 706 } 707 708 func (r RefreshingSecurityConfig) CAFiles() refreshable.StringSlice { 709 return refreshable.NewStringSlice(r.MapSecurityConfig(func(i httpclient.SecurityConfig) interface{} { 710 return i.CAFiles 711 })) 712 } 713 714 func (r RefreshingSecurityConfig) CertFile() refreshable.String { 715 return refreshable.NewString(r.MapSecurityConfig(func(i httpclient.SecurityConfig) interface{} { 716 return i.CertFile 717 })) 718 } 719 720 func (r RefreshingSecurityConfig) KeyFile() refreshable.String { 721 return refreshable.NewString(r.MapSecurityConfig(func(i httpclient.SecurityConfig) interface{} { 722 return i.KeyFile 723 })) 724 } 725 726 type RefreshableStringToClientConfig interface { 727 refreshable.Refreshable 728 CurrentStringToClientConfig() map[string]httpclient.ClientConfig 729 MapStringToClientConfig(func(map[string]httpclient.ClientConfig) interface{}) refreshable.Refreshable 730 SubscribeToStringToClientConfig(func(map[string]httpclient.ClientConfig)) (unsubscribe func()) 731 } 732 733 type RefreshingStringToClientConfig struct { 734 refreshable.Refreshable 735 } 736 737 func NewRefreshingStringToClientConfig(in refreshable.Refreshable) RefreshingStringToClientConfig { 738 return RefreshingStringToClientConfig{Refreshable: in} 739 } 740 741 func (r RefreshingStringToClientConfig) CurrentStringToClientConfig() map[string]httpclient.ClientConfig { 742 return r.Current().(map[string]httpclient.ClientConfig) 743 } 744 745 func (r RefreshingStringToClientConfig) MapStringToClientConfig(mapFn func(map[string]httpclient.ClientConfig) interface{}) refreshable.Refreshable { 746 return r.Map(func(i interface{}) interface{} { 747 return mapFn(i.(map[string]httpclient.ClientConfig)) 748 }) 749 } 750 751 func (r RefreshingStringToClientConfig) SubscribeToStringToClientConfig(consumer func(map[string]httpclient.ClientConfig)) (unsubscribe func()) { 752 return r.Subscribe(func(i interface{}) { 753 consumer(i.(map[string]httpclient.ClientConfig)) 754 }) 755 }