connect

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Simple operation to get the details about a particular cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	//
	//Protocol, hostname, port with trailing slash.  For example:
	//  http://localhost/
	//  http://localhost:8083/
	//  http://localhost:8083/some/mapped/path/
	//
	BaseURL *url.URL

	//User agent used when communicating with the APIs
	UserAgent string

	Clusters   *ClustersService
	Connectors *ConnectorsService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client, baseURL string) (*Client, error)

func NewClientWithBasicAuth added in v0.1.1

func NewClientWithBasicAuth(httpClient *http.Client, baseURL string, uname string, passwd string) (*Client, error)

type Cluster

type Cluster struct {
	Version        string `json:"version"`
	Commit         string `json:"commit"`
	KafkaClusterID string `json:"kafka_cluster_id"`
}

type ClustersService

type ClustersService service

func (*ClustersService) Get

func (s *ClustersService) Get() (Cluster, error)

type Connector

type Connector struct {
	Name   string                 `json:"name"`
	Config map[string]interface{} `json:"config,omitempty"`
	Tasks  []Task                 `json:"tasks,omitempty"`
}

A Connector struct with everything in it

type ConnectorsService

type ConnectorsService service

func (*ConnectorsService) Create

func (s *ConnectorsService) Create(name string, config map[string]interface{}) (Connector, error)

Create a new connector as in

https://docs.confluent.io/platform/current/connect/references/restapi.html#post--connectors

func (*ConnectorsService) Delete

func (s *ConnectorsService) Delete(name string) error

Delete a connector as in

https://docs.confluent.io/platform/current/connect/references/restapi.html#delete--connectors-(string-name)-

func (*ConnectorsService) Get

func (s *ConnectorsService) Get(name string) (Connector, error)

Get/Read a connector as in

https://docs.confluent.io/platform/current/connect/references/restapi.html#get--connectors-(string-name)

func (*ConnectorsService) List

func (s *ConnectorsService) List() ([]string, error)

List all connectors as in

https://docs.confluent.io/platform/current/connect/references/restapi.html#get--connectors

func (*ConnectorsService) Update

func (s *ConnectorsService) Update(name string, config map[string]interface{}) (Connector, error)

Update a connector as in

https://docs.confluent.io/platform/current/connect/references/restapi.html#put--connectors-(string-name)-config

type Task

type Task struct {
	Connector string `json:"connector"`
	Task      int    `json:"task"`
}

Task has both connector name and task id

Jump to

Keyboard shortcuts

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