mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
19 lines
344 B
Go
19 lines
344 B
Go
package redis
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/eosswedenorg/thalos/api"
|
|
)
|
|
|
|
// 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 api.Channel
|
|
}
|
|
|
|
func (k Key) String() string {
|
|
return fmt.Sprintf("%s::%s", k.NS, k.Channel.Format("/"))
|
|
}
|