Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientID ¶
type ClientID string
const ( ACTION_CLIENTID ClientID = "k8guard-action-kafka-client" DISCOVER_CLIENTID ClientID = "k8guard-discover-kafka-client" // Event consumer feature will be implemented in the future. EVENT_CONSUMER_CLIENTID ClientID = "k8guard-event-consumer-kafka-client" EVENT_PARSER_CLIENTID ClientID = "k8guard-event-parser-kafka-client" )
type KafkaProducer ¶
type KafkaProducer interface { SendMessage(topic string, bytes []byte) error SendData(topic string, kind MessageType, message interface{}) error Close() }
func NewProducer ¶
func NewProducer(clientId ClientID, Cfg config.Config) (KafkaProducer, error)
type MessageType ¶
type MessageType string
const ( NAMESPACE_MESSAGE MessageType = "namespace" POD_MESSAGE MessageType = "pod" DEPLOYMENT_MESSAGE MessageType = "deployment" INGRESS_MESSAGE MessageType = "ingress" JOB_MESSAGE MessageType = "job" CRONJOB_MESSAGE MessageType = "cronjob" // To be used to see if kafka topic is there. TEST_MESSAGE MessageType = "test" )
Click to show internal directories.
Click to hide internal directories.