Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions common_utils/notification_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"

sdcfg "github.com/sonic-net/sonic-gnmi/sonic_db_config"

Expand Down Expand Up @@ -89,3 +90,8 @@ func (n *NotificationProducer) Send(op, data string, kvs map[string]string) erro
log.Infof("Publishing to channel %s: %v.", n.ch, string(val))
return n.rc.Publish(context.Background(), n.ch, val).Err()
}

// getKey generates the hash key from the supplied string array.
func GetKey(k []string) string {
return strings.Join(k, "|")
}