kafka

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 18 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SHA256 scram.HashGeneratorFcn = func() hash.Hash { return sha256.New() }
View Source
var SHA512 scram.HashGeneratorFcn = func() hash.Hash { return sha512.New() }

Functions

func ACLOperationToString added in v0.2.5

func ACLOperationToString(in sarama.AclOperation) string

ACLOperationToString converts sarama.AclOperations to a String representation

func ACLPermissionTypeToString added in v0.2.5

func ACLPermissionTypeToString(in sarama.AclPermissionType) string

ACLPermissionTypeToString converts sarama.AclPermissionTypes to Strings

func ACLResourceToString added in v0.2.5

func ACLResourceToString(in sarama.AclResourceType) string

func ImportACL added in v0.2.12

func ImportACL(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error)

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 NewTLSConfig added in v0.2.3

func NewTLSConfig(clientCert, clientKey, caCert, clientKeyPassphrase string) (*tls.Config, error)

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 `json:"principal"`
	Host           string `json:"host"`
	Operation      string `json:"operation"`
	PermissionType string `json:"permission_type"`
}

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) DescribeACLs added in v0.2.5

func (c *Client) DescribeACLs(s StringlyTypedACL) ([]*sarama.ResourceAcls, error)

DescribeACLs get ResourceAcls for a specific resource

func (*Client) ListACLs

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

func (*Client) ReadTopic

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

func (*Client) SaramaClient added in v0.2.3

func (c *Client) SaramaClient() sarama.Client

func (*Client) UpdateTopic

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

type Config

type Config struct {
	BootstrapServers        *[]string
	Timeout                 int
	CACert                  string
	ClientCert              string
	ClientCertKey           string
	ClientCertKeyPassphrase string
	TLSEnabled              bool
	SkipTLSVerify           bool
	SASLUsername            string
	SASLPassword            string
	SASLMechanism           string
}

type LazyClient added in v0.2.4

type LazyClient struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*LazyClient) AddPartitions added in v0.2.4

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

func (*LazyClient) CreateACL added in v0.2.4

func (c *LazyClient) CreateACL(s StringlyTypedACL) error

func (*LazyClient) CreateTopic added in v0.2.4

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

func (*LazyClient) DeleteACL added in v0.2.4

func (c *LazyClient) DeleteACL(s StringlyTypedACL) error

func (*LazyClient) DeleteTopic added in v0.2.4

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

func (*LazyClient) ListACLs added in v0.2.4

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

func (*LazyClient) ReadTopic added in v0.2.4

func (c *LazyClient) ReadTopic(name string) (Topic, error)

func (*LazyClient) UpdateTopic added in v0.2.4

func (c *LazyClient) UpdateTopic(t Topic) error

type Resource

type Resource struct {
	Type              string `json:"type"`
	Name              string `json:"name"`
	PatternTypeFilter string `json:"pattern_type_filter"`
}

type StringlyTypedACL added in v0.2.3

type StringlyTypedACL struct {
	ACL      ACL `json:"acl"`
	Resource `json:"resource"`
}

func (StringlyTypedACL) String added in v0.2.3

func (a StringlyTypedACL) String() 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

type XDGSCRAMClient added in v0.2.0

type XDGSCRAMClient struct {
	*scram.Client
	*scram.ClientConversation
	scram.HashGeneratorFcn
}

func (*XDGSCRAMClient) Begin added in v0.2.0

func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)

func (*XDGSCRAMClient) Done added in v0.2.0

func (x *XDGSCRAMClient) Done() bool

func (*XDGSCRAMClient) Step added in v0.2.0

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Jump to

Keyboard shortcuts

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