kafka

package
v6.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AvailableLocations is a list of available locations for Kafka
	AvailableLocations = []string{"de/fra", "de/txl", "es/vit", "gb/lhr", "us/ewr", "us/las", "us/mci", "fr/par"}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper for the Kafka API Client

func NewClient

func NewClient(username, password, token, url, version, terraformVersion string) *Client

NewClient returns a new Kafka API client

func (*Client) CreateCluster

CreateCluster creates a new Kafka Cluster

func (*Client) CreateTopic

CreateTopic creates a new Kafka Cluster Topic

func (*Client) DeleteCluster

func (c *Client) DeleteCluster(ctx context.Context, id string, location string) (utils.ApiResponseInfo, error)

DeleteCluster deletes a Kafka Cluster

func (*Client) DeleteTopic

func (c *Client) DeleteTopic(ctx context.Context, clusterID string, topicID string, location string) (utils.ApiResponseInfo, error)

DeleteTopic deletes a Kafka Cluster Topic

func (*Client) GetClusterByID

func (c *Client) GetClusterByID(ctx context.Context, id string, location string) (
	kafka.ClusterRead, utils.ApiResponseInfo, error,
)

GetClusterByID retrieves a Kafka Cluster by its ID

func (*Client) GetTopicByID

func (c *Client) GetTopicByID(ctx context.Context, clusterID string, topicID string, location string) (
	kafka.TopicRead, utils.ApiResponseInfo, error,
)

GetTopicByID retrieves a Kafka Cluster Topic by its ID

func (*Client) IsClusterAvailable

func (c *Client) IsClusterAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)

IsClusterAvailable checks if the Kafka Cluster is available

func (*Client) IsClusterDeleted

func (c *Client) IsClusterDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)

IsClusterDeleted checks if the Kafka Cluster has been deleted

func (*Client) IsTopicAvailable

func (c *Client) IsTopicAvailable(ctx context.Context, d *schema.ResourceData) (bool, error)

IsTopicAvailable checks if a Kafka Cluster Topic is available

func (*Client) IsTopicDeleted

func (c *Client) IsTopicDeleted(ctx context.Context, d *schema.ResourceData) (bool, error)

IsTopicDeleted checks if a Kafka Cluster Topic has been deleted

func (*Client) ListClusters

func (c *Client) ListClusters(ctx context.Context, location string) (kafka.ClusterReadList, *kafka.APIResponse, error)

ListClusters retrieves a list of Kafka Clusters

func (*Client) ListTopics

func (c *Client) ListTopics(ctx context.Context, clusterID string, location string) (
	kafka.TopicReadList, utils.ApiResponseInfo, error,
)

ListTopics retrieves a list of Kafka Cluster Topics

func (*Client) SetKafkaClusterData

func (c *Client) SetKafkaClusterData(d *schema.ResourceData, cluster *kafka.ClusterRead) error

SetKafkaClusterData sets the Kafka Cluster data to the Terraform Resource Data

func (*Client) SetKafkaTopicData

func (c *Client) SetKafkaTopicData(d *schema.ResourceData, topic *kafka.TopicRead) error

SetKafkaTopicData sets the Kafka Cluster Topic data to the Terraform Resource Data

Jump to

Keyboard shortcuts

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