1 package config 2 3 import ( 4 "strings" 5 ) 6 7 const ( 8 // defaultChannels default comma separated list of channels to listen on. 9 defaultChannels = "cluster_events,helm_workloads_events,banner_events,label_events,workload_cluster_mapping_events" 10 ) 11 12 // ParseChannelList parses the comma separated string list of channels 13 // to be watched and returns them as a slice of strings. 14 func ParseChannelList(channels string) []string { 15 if channels == "" { 16 channels = defaultChannels 17 } 18 return strings.Split(channels, ",") 19 } 20