MCPcopy Create free account
hub / github.com/dadgar/onecache / newMockReplicator

Function newMockReplicator

onecache/replicator_test.go:16–18  ·  view source on GitHub ↗

newMockReplicator returns a mock replicator that can be used by tests. The passed function replaces the IsReplicating function.

(isReplicating func(key string) bool)

Source from the content-addressed store, hash-verified

14// newMockReplicator returns a mock replicator that can be used by tests.
15// The passed function replaces the IsReplicating function.
16func newMockReplicator(isReplicating func(key string) bool) *mockReplicator {
17 return &mockReplicator{isReplicating: isReplicating}
18}
19
20func (m *mockReplicator) Stop() {}
21func (m *mockReplicator) NodesRemoved([]string) {}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected