• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cinode / go / 15800282015

21 Jun 2025 10:34PM UTC coverage: 92.74% (-2.6%) from 95.318%
15800282015

push

github

byo
Merge branch 'datastore-refactor'

309 of 313 new or added lines in 5 files covered. (98.72%)

3334 of 3595 relevant lines covered (92.74%)

1.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/pkg/datastore/multisource/multi_source_options.go
1
/*
2
Copyright © 2025 Bartłomiej Święcki (byo)
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package multisource
18

19
import (
20
        "time"
21

22
        "github.com/cinode/go/pkg/datastore"
23
        "golang.org/x/exp/slog"
24
)
25

26
type Option func(*multiSourceDatastore)
27

28
func WithDynamicDataRefreshTime(refreshTime time.Duration) Option {
1✔
29
        return func(m *multiSourceDatastore) {
2✔
30
                m.dynamicDataRefreshTime = refreshTime
1✔
31
        }
1✔
32
}
33

NEW
34
func WithLogger(log *slog.Logger) Option {
×
NEW
35
        return func(m *multiSourceDatastore) {
×
NEW
36
                m.log = log
×
NEW
37
        }
×
38
}
39

40
func WithAdditionalDatastores(additional ...datastore.DS) Option {
1✔
41
        return func(m *multiSourceDatastore) {
2✔
42
                m.additional = append(m.additional, additional...)
1✔
43
        }
1✔
44
}
45

46
func WithNotFoundRecheckTime(notFoundRecheckTime time.Duration) Option {
1✔
47
        return func(m *multiSourceDatastore) {
2✔
48
                m.notFoundRecheckTime = notFoundRecheckTime
1✔
49
        }
1✔
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc