Documentation ¶
Index ¶
- Variables
- func CreateKafkaConsumer(triggerObjName, funcName, ns, topic string, clientset kubernetes.Interface) error
- func DeleteKafkaConsumer(triggerObjName, funcName, ns, topic string) error
- func GetSASLConfiguration(username string, password string) (string, string, error)
- func GetTLSConfiguration(caFile string, certFile string, keyFile string, insecure string) (*tls.Config, error)
- type Consumer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorCrtFileMandatory when private key is provided but certificate not. ErrorCrtFileMandatory = errors.New("client certificate is mandatory when private key file is provided") // ErrorKeyFileMandatory when certificate is provided but private not. ErrorKeyFileMandatory = errors.New("client private key is mandatory when certificate file is provided") // ErrorUsernameOrPasswordMandatory when username or password is not provided ErrorUsernameOrPasswordMandatory = errors.New("username and password is mandatory") )
Functions ¶
func CreateKafkaConsumer ¶
func CreateKafkaConsumer(triggerObjName, funcName, ns, topic string, clientset kubernetes.Interface) error
CreateKafkaConsumer creates a goroutine that subscribes to Kafka topic
func DeleteKafkaConsumer ¶
DeleteKafkaConsumer deletes goroutine created by CreateKafkaConsumer
func GetSASLConfiguration ¶
GetSASLConfiguration build SASL configuration for kafka.
Types ¶
type Consumer ¶ added in v1.0.5
type Consumer struct {
// contains filtered or unexported fields
}
Consumer represents a Sarama consumer group consumer.
func NewConsumer ¶ added in v1.0.5
func NewConsumer(funcName string, funcPort int, ns string, clientset kubernetes.Interface, ready chan struct{}, backoff time.Duration) *Consumer
NewConsumer returns new consumer.
func (*Consumer) Cleanup ¶ added in v1.0.5
func (c *Consumer) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited.
func (*Consumer) ConsumeClaim ¶ added in v1.0.5
func (c *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().
Click to show internal directories.
Click to hide internal directories.