From 6126870934cae7bd15bc2a53cae18b190a818c43 Mon Sep 17 00:00:00 2001 From: Sam Davies Date: Thu, 11 Jan 2024 10:34:29 -0500 Subject: [PATCH] StreamID => type alias --- core/services/streams/delegate.go | 2 +- core/services/streams/stream_registry.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/services/streams/delegate.go b/core/services/streams/delegate.go index fac2c7a36b3..3b9b5c773ae 100644 --- a/core/services/streams/delegate.go +++ b/core/services/streams/delegate.go @@ -48,7 +48,7 @@ func (d *Delegate) ServicesForSpec(jb job.Job) (services []job.ServiceCtx, err e return nil, errors.New("job name is required to be present for stream specs") } id := StreamID(jb.Name.String) - lggr := d.lggr.Named(id.String()).With("streamID", id) + lggr := d.lggr.Named(id).With("streamID", id) rrs := ocrcommon.NewResultRunSaver(d.runner, lggr, d.cfg.MaxSuccessfulRuns(), d.cfg.ResultWriteQueueDepth()) services = append(services, rrs, &StreamService{ diff --git a/core/services/streams/stream_registry.go b/core/services/streams/stream_registry.go index 6034c5d6b4a..c79c6c4e043 100644 --- a/core/services/streams/stream_registry.go +++ b/core/services/streams/stream_registry.go @@ -8,11 +8,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) -type StreamID string - -func (s StreamID) String() string { - return string(s) -} +type StreamID = string type Registry interface { Get(streamID StreamID) (strm Stream, exists bool)