connect

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteConnector

func DeleteConnector(endpoint, name string) error

func ListTopics

func ListTopics(endpoint, name string) ([]string, error)

Types

type Connector

type Connector struct {
	Name   ConnectorName   `json:"name"`
	Config ConnectorConfig `json:"config"`
	Type   string          `json:"type"`
	Tasks  []Task          `json:"tasks"`
}

func CreateConnector

func CreateConnector(endpoint string, configJSON io.Reader) (*Connector, error)

func GetConnector

func GetConnector(endpoint, name string) (*Connector, error)

type ConnectorConfig

type ConnectorConfig map[string]string

func GetConnectorConfig

func GetConnectorConfig(endpoint, name string) (*ConnectorConfig, error)

type ConnectorName

type ConnectorName = string

func GetConnectorNames

func GetConnectorNames(endpoint string) ([]ConnectorName, error)

type ConnectorPlugin

type ConnectorPlugin struct {
	Class   string `json:"class"`
	Type    string `json:"type"`
	Version string `json:"version"`
}

func ListConnectorPlugin

func ListConnectorPlugin(endpoint string) ([]ConnectorPlugin, error)

type ConnectorState

type ConnectorState struct {
	State    string `json:"state"`
	WorkerID string `json:"worker_id"`
}

type ConnectorStatus

type ConnectorStatus struct {
	Name  string         `json:"name"`
	State ConnectorState `json:"connector"`
	Tasks []TaskState    `json:"tasks"`
	Type  string         `json:"type"`
}

func GetConnectorStatus

func GetConnectorStatus(endpoint, name string) (*ConnectorStatus, error)

type Error

type Error struct {
	Code    int    `json:"error_code"`
	Message string `json:"message"`
}

type Task

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

type TaskConfig

type TaskConfig map[string]string

type TaskInfo

type TaskInfo struct {
	ID     Task       `json:"id"`
	Config TaskConfig `json:"config"`
}

func ListTasks

func ListTasks(endpoint, name string) ([]TaskInfo, error)

type TaskState

type TaskState struct {
	ID       int    `json:"id"`
	State    string `json:"state"`
	WorkerID string `json:"worker_id"`
}

func GetTaskStatus

func GetTaskStatus(endpoint, name string, id int) (*TaskState, error)

type TaskTopics

type TaskTopics map[string]Topics

type Topics

type Topics struct {
	Topics []string `json:"topics"`
}

type Worker

type Worker struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	ID      string `json:"kafka_worker_id"`
}

func GetWorker

func GetWorker(endpoint string) (*Worker, error)

Jump to

Keyboard shortcuts

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