v2

package
v0.0.0-...-c428d36 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokIDKrbApReq https://tools.ietf.org/html/rfc4121#section-4.1
	TokIDKrbApReq = "\x01\x00"
)

Variables

This section is empty.

Functions

func Gokrb5v8

func Gokrb5v8(client Gokrb5v8Client, kafkaServiceName string) sasl.Mechanism

Gokrb5v8 uses gokrb5/v8 to implement the GSSAPI mechanism.

client is a github.com/gokrb5/v8/client *Client instance. kafkaServiceName is the name of the Kafka service in your Kerberos.

func NewFactory

func NewFactory(
	options *pkafka.Options,
	changefeedID model.ChangeFeedID,
) (pkafka.Factory, error)

NewFactory returns a factory implemented based on kafka-go

Types

type Client

type Client interface {
	Metadata(ctx context.Context, req *kafka.MetadataRequest) (*kafka.MetadataResponse, error)
	DescribeConfigs(
		ctx context.Context, req *kafka.DescribeConfigsRequest,
	) (*kafka.DescribeConfigsResponse, error)
	CreateTopics(
		ctx context.Context, req *kafka.CreateTopicsRequest,
	) (*kafka.CreateTopicsResponse, error)
}

Client is the interface of the kafka-go client, it contains a subset of all methods which is used by the kafka sink. This interface is mainly used to support mock kafka-go client in unit test.

type Gokrb5v8Client

type Gokrb5v8Client interface {
	// GetServiceTicket get a ticker form server
	GetServiceTicket(spn string) (messages.Ticket, types.EncryptionKey, error)
	// Destroy stops the auto-renewal of all sessions and removes
	// the sessions and cache entries from the client.
	Destroy()
	// Credentials returns the client credentials
	Credentials() *credentials.Credentials
}

Gokrb5v8Client is the client for gokrbv8

type MetricsCollector

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

MetricsCollector is the kafka metrics collector based on kafka-go library.

func NewMetricsCollector

func NewMetricsCollector(
	changefeedID model.ChangeFeedID,
	role util.Role,
	writer Writer,
) *MetricsCollector

NewMetricsCollector return a kafka metrics collector

func (*MetricsCollector) Run

func (m *MetricsCollector) Run(ctx context.Context)

Run implement the MetricsCollector interface

type StartWithoutHostError

type StartWithoutHostError struct{}

StartWithoutHostError is the error type for when Start is called on the GSSAPI mechanism without the host having been set by WithHost.

Unless you are calling the GSSAPI SASL mechanim's Start method yourself for some reason, this error will never be returned.

func (StartWithoutHostError) Error

func (e StartWithoutHostError) Error() string

type Writer

type Writer interface {
	Stats() kafka.WriterStats
	WriteMessages(ctx context.Context, msgs ...kafka.Message) error
	Close() error
}

Writer is the interface of the kafka-go writer, it contains a subset of all methods which is used by the kafka sink. This interface is mainly used to support mock kafka-go client in unit test.

Directories

Path Synopsis
Package mock_v2 is a generated GoMock package.
Package mock_v2 is a generated GoMock package.

Jump to

Keyboard shortcuts

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