kafka

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapEq

func MapEq(result, expected map[string]*string) error

MapEq compares two maps, and checks that the keys and values are the same

func Provider

func Provider() terraform.ResourceProvider

func ReplicaCount

func ReplicaCount(c sarama.Client, topic string, partitions []int32) (int, error)

ReplicaCount returns the replication_factor for a partition Returns an error if it cannot determine the count, or if the number of replicas is different across partitions

Types

type ACL

type ACL struct {
	Principal      string
	Host           string
	Operation      string
	PermissionType string
}

type Client

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

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) AddPartitions

func (c *Client) AddPartitions(t Topic) error

func (*Client) CreateACL

func (c *Client) CreateACL(s stringlyTypedACL) error

func (*Client) CreateTopic

func (c *Client) CreateTopic(t Topic) error

func (*Client) DeleteACL

func (c *Client) DeleteACL(s stringlyTypedACL) error

func (*Client) DeleteTopic

func (c *Client) DeleteTopic(t string) error

func (*Client) ListACLs

func (c *Client) ListACLs() ([]*sarama.ResourceAcls, error)

func (*Client) ReadTopic

func (client *Client) ReadTopic(name string) (Topic, error)

func (*Client) UpdateTopic

func (c *Client) UpdateTopic(topic Topic) error

type Config

type Config struct {
	BootstrapServers *[]string
	Timeout          int
	CACertFile       string
	ClientCertFile   string
	ClientCertKey    string
	TLSEnabled       bool
	SkipTLSVerify    bool
	SASLUsername     string
	SASLPassword     string
}

type Resource

type Resource struct {
	Type string
	Name string
}

type Topic

type Topic struct {
	Name              string
	Partitions        int32
	ReplicationFactor int16
	Config            map[string]*string
}

func (*Topic) Equal

func (t *Topic) Equal(other Topic) bool

type TopicMissingError

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

func (TopicMissingError) Error

func (e TopicMissingError) Error() string

Jump to

Keyboard shortcuts

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