MCPcopy
hub / github.com/safing/portmaster / ValueProvider

Interface ValueProvider

base/runtime/provider.go:28–39  ·  view source on GitHub ↗

ValueProvider provides access to a runtime-computed database record.

Source from the content-addressed store, hash-verified

26 // ValueProvider provides access to a runtime-computed
27 // database record.
28 ValueProvider interface {
29 // Set is called when the value is set from outside.
30 // If the runtime value is considered read-only ErrReadOnly
31 // should be returned. It is guaranteed that the key of
32 // the record passed to Set is prefixed with the key used
33 // to register the value provider.
34 Set(r record.Record) (record.Record, error)
35 // Get should return one or more records that match keyOrPrefix.
36 // keyOrPrefix is guaranteed to be at least the prefix used to
37 // register the ValueProvider.
38 Get(keyOrPrefix string) ([]record.Record, error)
39 }
40
41 // SimpleValueSetterFunc is a convenience type for implementing a
42 // write-only value provider.

Callers 16

selfcheckTaskFuncFunction · 0.65
downloadDataMethod · 0.65
GatherConnectionInfoMethod · 0.65
packetHandlerWorkerMethod · 0.65
NewFunction · 0.65
getUpdateResourceFunction · 0.65
handleGetProfileIconFunction · 0.65
debugInfoFunction · 0.65
restartFunction · 0.65
getUpdateResourceFunction · 0.65
debugInfoFunction · 0.65

Implementers 7

ModulesIntegrationservice/core/events.go
JSONAccessorbase/database/accessor/accessor-json-s
JSONBytesAccessorbase/database/accessor/accessor-json-b
StructAccessorbase/database/accessor/accessor-struct
singleRecordReaderbase/runtime/singe_record_provider.go
traceValueProviderbase/runtime/trace_provider.go
testProviderbase/runtime/registry_test.go

Calls

no outgoing calls

Tested by

no test coverage detected