mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
internal/redis/namespace.go: Adding Namespace.NewKey() helper function.
This commit is contained in:
parent
13c8ed7692
commit
1bc43cc87b
1 changed files with 5 additions and 0 deletions
|
|
@ -24,6 +24,11 @@ type Namespace struct {
|
|||
ChainID string
|
||||
}
|
||||
|
||||
// Create a new key with this namespace.
|
||||
func (ns Namespace) NewKey(ch ChannelInterface) Key {
|
||||
return Key{NS: ns, Channel: ch}
|
||||
}
|
||||
|
||||
func (ns Namespace) String() string {
|
||||
// No Chain id, set to "nullChain"
|
||||
if len(ns.ChainID) < 1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue