MCPcopy
hub / github.com/moby/moby / KVObject

Interface KVObject

daemon/libnetwork/datastore/datastore.go:27–51  ·  view source on GitHub ↗

KVObject is Key/Value interface used by objects to be part of the Store.

Source from the content-addressed store, hash-verified

25
26// KVObject is Key/Value interface used by objects to be part of the Store.
27type KVObject interface {
28 // Key method lets an object provide the Key to be used in KV Store
29 Key() []string
30 // KeyPrefix method lets an object return immediate parent key that can be used for tree walk
31 KeyPrefix() []string
32 // Value method lets an object marshal its content to be stored in the KV store
33 Value() []byte
34 // SetValue is used by the datastore to set the object's value when loaded from the data store.
35 SetValue([]byte) error
36 // Index method returns the latest DB Index as seen by the object
37 Index() uint64
38 // SetIndex method allows the datastore to store the latest DB Index into the object
39 SetIndex(uint64)
40 // Exists returns true if the object exists in the datastore, false if it hasn't been stored yet.
41 // When SetIndex() is called, the object has been stored.
42 Exists() bool
43 // Skip provides a way for a KV Object to avoid persisting it in the KV Store
44 Skip() bool
45 // New returns a new object which is created based on the
46 // source object
47 New() KVObject
48 // CopyTo deep copies the contents of the implementing object
49 // to the passed destination object
50 CopyTo(KVObject) error
51}
52
53const (
54 // NetworkKeyPrefix is the prefix for network key in the kv store

Callers 58

setNetworkSandboxFunction · 0.65
setupOSLSandboxMethod · 0.65
checkSandboxFunction · 0.65
TestEndpointJoinFunction · 0.65
externalKeyTestFunction · 0.65
NetnsPathMethod · 0.65
deleteFromStoreMethod · 0.65
TestControllerGetSandboxFunction · 0.65
kmapMethod · 0.65
ProtoMethod · 0.65
AppendToMethod · 0.65
ProtoMethod · 0.65

Implementers 13

endpointCntdaemon/libnetwork/endpoint_cnt.go
Networkdaemon/libnetwork/network.go
Endpointdaemon/libnetwork/endpoint.go
sbStatedaemon/libnetwork/sandbox_store.go
dummyObjectdaemon/libnetwork/datastore/datastore_
configurationdaemon/libnetwork/drivers/ipvlan/ipvla
endpointdaemon/libnetwork/drivers/ipvlan/ipvla
networkConfigurationdaemon/libnetwork/drivers/bridge/bridg
bridgeEndpointdaemon/libnetwork/drivers/bridge/bridg
networkConfigurationdaemon/libnetwork/drivers/windows/wind
hnsEndpointdaemon/libnetwork/drivers/windows/wind
configurationdaemon/libnetwork/drivers/macvlan/macv

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…