DurableEmitter: Refactor Core Integration#22648
Conversation
|
I see you updated files related to
|
|
✅ No conflicts with other open PRs targeting |
…CRE-4422-refactor-durable-emitter
…CRE-4422-refactor-durable-emitter
…ontractkit/chainlink into CRE-4315-fix-integration-test
…ion-test Enable DurableEmitter integration test
|
|
Building on the helper added in smartcontractkit/chainlink-common#2096 ( Proposed change (one file, ~10 LOC)File: // before
var auth chipingress.HeaderProvider
if len(beholderAuthHeaders) > 0 {
auth = beholder.NewStaticAuth(
beholderAuthHeaders,
!cfg.Telemetry().ChipIngressInsecureConnection(),
)
}// after
auth, err := chipingress.NewHeaderProvider(chipingress.HeaderProviderConfig{
AuthHeaders: beholderAuthHeaders,
AuthHeadersTTL: cfg.Telemetry().AuthHeadersTTL(),
AuthPublicKeyHex: csaPubKeyHex,
AuthKeySigner: csaKeystore, // already constructed at line 285
InsecureConnection: cfg.Telemetry().ChipIngressInsecureConnection(),
})
if err != nil {
return nil, fmt.Errorf("failed to build chip ingress auth: %w", err)
}Why it slots in cleanlyEvery input is already in scope a few lines up:
Notes
DependencyLocally verified: |
| var auth chipingress.HeaderProvider | ||
| if len(beholderAuthHeaders) > 0 { | ||
| auth = beholder.NewStaticAuth(beholderAuthHeaders, !cfg.Telemetry().ChipIngressInsecureConnection()) | ||
| } |
There was a problem hiding this comment.
| var auth chipingress.HeaderProvider | |
| if len(beholderAuthHeaders) > 0 { | |
| auth = beholder.NewStaticAuth(beholderAuthHeaders, !cfg.Telemetry().ChipIngressInsecureConnection()) | |
| } | |
| auth, err := chipingress.NewHeaderProvider(chipingress.HeaderProviderConfig{ | |
| AuthHeaders: beholderAuthHeaders, | |
| AuthHeadersTTL: cfg.Telemetry().AuthHeadersTTL(), | |
| AuthPublicKeyHex: csaPubKeyHex, | |
| AuthKeySigner: csaKeystore, // already constructed at line 285 | |
| InsecureConnection: cfg.Telemetry().ChipIngressInsecureConnection(), | |
| }) | |
| if err != nil { | |
| return nil, fmt.Errorf("failed to build chip ingress auth: %w", err) | |
| } |




Integrates DurableEmitter with core.
Requires
DurableEmitter: Refactor with batch emitter