kafkaconnectclient

package
v0.0.0-...-72da4f8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKafkaConnectConfig

func GetKafkaConnectConfig(configMapItf corev1.ConfigMapInterface, config kafkaconnectv1alpha1.KafkaConnectorConfig) (map[string]interface{}, error)

GetKafkaConnectConfig read the config from KafkaConnectorConfig either use URL or ConfigMap, URL has higher prio

Types

type KCClient

type KCClient struct {
}

KCClient client to acess to kafka connect rest api

func (*KCClient) DeleteConnector

func (kcc *KCClient) DeleteConnector(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) error

DeleteConnector delete an connector via rest api

func (*KCClient) GetAllConnectors

func (kcc *KCClient) GetAllConnectors(kafkaConenctNamespacedname types.NamespacedName, port int32) ([]string, error)

GetAllConnectors get list connect names

func (*KCClient) GetKafkaConnectConfig

func (kcc *KCClient) GetKafkaConnectConfig(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) (map[string]interface{}, error)

GetKafkaConnectConfig get the existing config from kafkaconnect rest api

func (*KCClient) GetKafkaConnectorRunningTaskNb

func (kcc *KCClient) GetKafkaConnectorRunningTaskNb(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) (int32, error)

GetKafkaConnectorRunningTaskNb get the current running task number for a connector

func (*KCClient) PutKafkaConnectConfig

func (kcc *KCClient) PutKafkaConnectConfig(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName, body []byte) error

PutKafkaConnectConfig send config to kafka rest api

type KCClientItf

type KCClientItf interface {
	GetKafkaConnectConfig(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) (map[string]interface{}, error)
	GetKafkaConnectorRunningTaskNb(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) (int32, error)
	PutKafkaConnectConfig(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName, body []byte) error
	GetAllConnectors(kafkaConenctNamespacedname types.NamespacedName, port int32) ([]string, error)
	DeleteConnector(connectorName string, port int32, kafkaConenctNamespacedname types.NamespacedName) error
}

KCClientItf inter face for client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL