mirror of
https://github.com/eosswedenorg/thalos
synced 2026-08-31 21:08:14 +02:00
Move Key and Namespace from transport/redis_pubsub to transport/redis_common
This commit is contained in:
parent
acdf827223
commit
531a2d3d17
9 changed files with 10 additions and 5 deletions
19
transport/redis_common/key.go
Normal file
19
transport/redis_common/key.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package redis_common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"eosio-ship-trace-reader/transport"
|
||||
)
|
||||
|
||||
// Key consists of a namespace and a channel.
|
||||
// And is encoded to a string in this format: `<namespace>::<channel>`
|
||||
|
||||
type Key struct {
|
||||
NS Namespace
|
||||
Channel transport.Channel
|
||||
}
|
||||
|
||||
func (k Key) String() string {
|
||||
return fmt.Sprintf("%s::%s", k.NS, k.Channel)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue