kafkaconnectclient

package
v0.0.0-...-0737ae5 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFromURL

func GetConfigFromURL(url string) (map[string]interface{}, error)

GetConfigFromURL read the config from a url

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