Skip to content

Commit 4339141

Browse files
authored
Add extra stuff to DSopts (#79)
1 parent 4119aaa commit 4339141

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

llo/plugin.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,30 @@ const (
4343
type DSOpts interface {
4444
VerboseLogging() bool
4545
SeqNr() uint64
46+
OutCtx() ocr3types.OutcomeContext
47+
ConfigDigest() ocr2types.ConfigDigest
4648
}
4749

4850
type dsOpts struct {
4951
verboseLogging bool
50-
seqNr uint64
52+
outCtx ocr3types.OutcomeContext
53+
configDigest ocr2types.ConfigDigest
5154
}
5255

5356
func (o dsOpts) VerboseLogging() bool {
5457
return o.verboseLogging
5558
}
5659

5760
func (o dsOpts) SeqNr() uint64 {
58-
return o.seqNr
61+
return o.outCtx.SeqNr
62+
}
63+
64+
func (o dsOpts) OutCtx() ocr3types.OutcomeContext {
65+
return o.outCtx
66+
}
67+
68+
func (o dsOpts) ConfigDigest() ocr2types.ConfigDigest {
69+
return o.configDigest
5970
}
6071

6172
type DataSource interface {

llo/plugin_observation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (p *Plugin) observation(ctx context.Context, outctx ocr3types.OutcomeContex
137137
}
138138
}
139139

140-
if err := p.DataSource.Observe(ctx, streamValues, dsOpts{p.Config.VerboseLogging, outctx.SeqNr}); err != nil {
140+
if err := p.DataSource.Observe(ctx, streamValues, dsOpts{p.Config.VerboseLogging, outctx, p.ConfigDigest}); err != nil {
141141
return nil, fmt.Errorf("DataSource.Observe error: %w", err)
142142
}
143143
}

0 commit comments

Comments
 (0)