Documentation ¶
Index ¶
- type ApiError
- type Client
- func (c *Client) CreateConnector(ctx context.Context, req CreateConnectorRequest) (ConnectorInfo, error)
- func (c *Client) DeleteConnector(ctx context.Context, connectorName string) error
- func (c *Client) GetConnector(ctx context.Context, connectorName string) (ConnectorInfo, error)
- func (c *Client) GetConnectorConfig(ctx context.Context, connectorName string) (map[string]string, error)
- func (c *Client) GetConnectorPlugins(ctx context.Context) ([]ConnectorPluginInfo, error)
- func (c *Client) GetConnectorStatus(ctx context.Context, connectorName string) (ConnectorStateInfo, error)
- func (c *Client) GetConnectorTopics(ctx context.Context, connectorName string) (map[string]ConnectorTopics, error)
- func (c *Client) GetRoot(ctx context.Context) (RootResource, error)
- func (c *Client) ListConnectors(ctx context.Context) ([]string, error)
- func (c *Client) ListConnectorsExpanded(ctx context.Context) (map[string]ListConnectorsResponseExpanded, error)
- func (c *Client) PauseConnector(ctx context.Context, connectorName string) error
- func (c *Client) PutConnectorConfig(ctx context.Context, connectorName string, options PutConnectorConfigOptions) (ConnectorInfo, error)
- func (c *Client) RestartConnector(ctx context.Context, connectorName string) error
- func (c *Client) RestartConnectorTask(ctx context.Context, connectorName string, taskID int) error
- func (c *Client) ResumeConnector(ctx context.Context, connectorName string) error
- type ClientOption
- func WithAuthToken(token string) ClientOption
- func WithBasicAuth(username string, password string) ClientOption
- func WithHost(host string) ClientOption
- func WithTLSConfig(tlsCfg *tls.Config) ClientOption
- func WithTimeout(timeout time.Duration) ClientOption
- func WithUserAgent(userAgent string) ClientOption
- type ConnectorInfo
- type ConnectorPluginInfo
- type ConnectorState
- type ConnectorStateInfo
- type ConnectorTaskID
- type ConnectorTopics
- type CreateConnectorRequest
- type ListConnectorsOptions
- type ListConnectorsResponseExpanded
- type ListConnectorsResponseExpandedInfo
- type ListConnectorsResponseExpandedStatus
- type PutConnectorConfigOptions
- type RootResource
- type TaskState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiError ¶
ApiError is the standard error message format for all returned errors (status codes in the 400 or 500 range).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client that talks to the Kafka Connect instances via HTTP
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
func (*Client) CreateConnector ¶
func (c *Client) CreateConnector(ctx context.Context, req CreateConnectorRequest) (ConnectorInfo, error)
func (*Client) DeleteConnector ¶
func (*Client) GetConnector ¶
func (*Client) GetConnectorConfig ¶
func (*Client) GetConnectorPlugins ¶
func (c *Client) GetConnectorPlugins(ctx context.Context) ([]ConnectorPluginInfo, error)
func (*Client) GetConnectorStatus ¶
func (*Client) GetConnectorTopics ¶
func (*Client) ListConnectors ¶
func (*Client) ListConnectorsExpanded ¶
func (*Client) PauseConnector ¶
func (*Client) PutConnectorConfig ¶
func (c *Client) PutConnectorConfig(ctx context.Context, connectorName string, options PutConnectorConfigOptions) (ConnectorInfo, error)
func (*Client) RestartConnector ¶
func (*Client) RestartConnectorTask ¶
type ClientOption ¶
type ClientOption func(c *Client)
func WithAuthToken ¶
func WithAuthToken(token string) ClientOption
func WithBasicAuth ¶
func WithBasicAuth(username string, password string) ClientOption
func WithHost ¶
func WithHost(host string) ClientOption
func WithTLSConfig ¶
func WithTLSConfig(tlsCfg *tls.Config) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
type ConnectorInfo ¶
type ConnectorInfo struct { Name string `json:"name"` Config map[string]string `json:"config"` Tasks []ConnectorTaskID `json:"tasks"` Type string `json:"type,omitempty"` }
type ConnectorPluginInfo ¶
type ConnectorState ¶
type ConnectorStateInfo ¶
type ConnectorStateInfo struct { Name string `json:"name"` Connector ConnectorState `json:"connector"` Tasks []TaskState `json:"tasks"` Type string `json:"type"` }
type ConnectorTaskID ¶
type ConnectorTopics ¶
type ConnectorTopics struct {
Topics []string `json:"topics"`
}
type CreateConnectorRequest ¶
type CreateConnectorRequest struct { Name string `json:"name"` Config map[string]string `json:"config"` }
func (*CreateConnectorRequest) Validate ¶
func (c *CreateConnectorRequest) Validate() error
type ListConnectorsOptions ¶
ListConnectorsOptions describe the available options to list connectors. Either Status or Info must be set to true.
func (*ListConnectorsOptions) Validate ¶
func (l *ListConnectorsOptions) Validate() error
type ListConnectorsResponseExpanded ¶
type ListConnectorsResponseExpanded struct { Info ListConnectorsResponseExpandedInfo `json:"info"` Status ListConnectorsResponseExpandedStatus `json:"status"` }
ListConnectorsResponseExpanded is the response to /connectors if the expand query parameters are set.
type ListConnectorsResponseExpandedInfo ¶
type ListConnectorsResponseExpandedInfo struct { Name string `json:"name"` Config map[string]string `json:"config"` Tasks []struct { Connector string `json:"connector"` Task int `json:"task"` } `json:"tasks"` Type string `json:"type"` }
ListConnectorsResponseExpandedInfo represents the Info object for described connectors.
type ListConnectorsResponseExpandedStatus ¶
type ListConnectorsResponseExpandedStatus struct { Name string `json:"name"` Connector struct { State string `json:"state"` WorkerID string `json:"worker_id"` } Tasks []struct { ID int `json:"id"` State string `json:"state"` WorkerID string `json:"worker_id"` } `json:"tasks"` Type string `json:"type"` }
ListConnectorsResponseExpandedStatus represents the Status object for described connectors.
type RootResource ¶
Source Files ¶
- client.go
- create_connector.go
- delete_connector.go
- get_connector.go
- get_connector_config.go
- get_connector_plugins.go
- get_connector_status.go
- get_connector_topics.go
- get_root.go
- list_connectors.go
- option.go
- pause_connector.go
- put_connector_config.go
- rest_error.go
- restart_connector.go
- restart_task.go
- resume_connector.go
Click to show internal directories.
Click to hide internal directories.