MCPcopy Create free account
hub / github.com/DoNewsCode/core / New

Function New

key/key_manager.go:53–57  ·  view source on GitHub ↗

New constructs a manager from alternating key values. manager := New("module", "foo", "service", "bar")

(parts ...string)

Source from the content-addressed store, hash-verified

51//
52// manager := New("module", "foo", "service", "bar")
53func New(parts ...string) manager {
54 return manager{
55 Prefixes: parts,
56 }
57}
58
59// Key creates a string key composed by labels stored in manager
60func (k manager) Key(delimiter string, parts ...string) string {

Callers 12

NewManagerFunction · 0.92
TestNewManagerFunction · 0.92
ExampleFunction · 0.92
ExampleWithFunction · 0.92
ExampleKeepOddFunction · 0.92
Example_keyFunction · 0.92
TestElectionFunction · 0.92
newDefaultDriverFunction · 0.92
TestNewEtcdDriverFunction · 0.92
TestCampaignFunction · 0.92
TestNewRedisDriverFunction · 0.92
TestElectionFunction · 0.92

Calls

no outgoing calls

Tested by 10

TestNewManagerFunction · 0.74
ExampleFunction · 0.74
ExampleWithFunction · 0.74
ExampleKeepOddFunction · 0.74
Example_keyFunction · 0.74
TestElectionFunction · 0.74
TestNewEtcdDriverFunction · 0.74
TestCampaignFunction · 0.74
TestNewRedisDriverFunction · 0.74
TestElectionFunction · 0.74