kafkaacls

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnonymousUserPrincipalName = "User:ANONYMOUS"
	AnyUserPrincipalName       = "User:*"
)

Variables

View Source
var (
	KafkaOperationToAclOperationBMap = bimap.NewBiMapFromMap(kafkaOperationToAclOperation)
)
View Source
var (
	ServerSpecNotFound = errors.New("failed getting kafka server connection - server configuration specs not set")
)

Functions

This section is empty.

Types

type IntentsAdminFactoryFunction

type IntentsAdminFactoryFunction func(serverConfig otterizev1alpha2.KafkaServerConfig, _ otterizev1alpha2.TLSSource, enableKafkaACLCreation bool, enforcementEnabledGlobally bool) (KafkaIntentsAdmin, error)

type KafkaIntentsAdmin

type KafkaIntentsAdmin interface {
	ApplyServerTopicsConf(topicsConf []otterizev1alpha2.TopicConfig) error
	ApplyClientIntents(clientName string, clientNamespace string, intents []otterizev1alpha2.Intent) error
	RemoveClientIntents(clientName string, clientNamespace string) error
	RemoveAllIntents() error
	Close()
}

func NewKafkaIntentsAdmin

func NewKafkaIntentsAdmin(kafkaServer otterizev1alpha2.KafkaServerConfig, defaultTls otterizev1alpha2.TLSSource, enableKafkaACLCreation bool, enforcementEnabledGlobally bool) (KafkaIntentsAdmin, error)

func NewKafkaIntentsAdminImpl

func NewKafkaIntentsAdminImpl(kafkaServer otterizev1alpha2.KafkaServerConfig, a sarama.ClusterAdmin, usernameMapping string, enableKafkaACLCreation bool, enforcementEnabledGlobally bool) KafkaIntentsAdmin

type KafkaIntentsAdminImpl

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

func (*KafkaIntentsAdminImpl) ApplyClientIntents

func (a *KafkaIntentsAdminImpl) ApplyClientIntents(clientName string, clientNamespace string, intents []otterizev1alpha2.Intent) error

func (*KafkaIntentsAdminImpl) ApplyServerTopicsConf

func (a *KafkaIntentsAdminImpl) ApplyServerTopicsConf(topicsConf []otterizev1alpha2.TopicConfig) error

func (*KafkaIntentsAdminImpl) Close

func (a *KafkaIntentsAdminImpl) Close()

func (*KafkaIntentsAdminImpl) RemoveAllIntents

func (a *KafkaIntentsAdminImpl) RemoveAllIntents() error

func (*KafkaIntentsAdminImpl) RemoveClientIntents

func (a *KafkaIntentsAdminImpl) RemoveClientIntents(clientName string, clientNamespace string) error

type ServersStore

type ServersStore interface {
	Add(config *otterizev1alpha2.KafkaServerConfig)
	Remove(serverName string, namespace string)
	Exists(serverName string, namespace string) bool
	Get(serverName string, namespace string) (KafkaIntentsAdmin, error)
	MapErr(f func(types.NamespacedName, *otterizev1alpha2.KafkaServerConfig, otterizev1alpha2.TLSSource) error) error
}

type ServersStoreImpl

type ServersStoreImpl struct {
	IntentsAdminFactoryFunction IntentsAdminFactoryFunction
	// contains filtered or unexported fields
}

func NewServersStore

func NewServersStore(tlsSourceFiles otterizev1alpha2.TLSSource, enableKafkaACLCreation bool, factoryFunc IntentsAdminFactoryFunction, enforcementEnabledGlobally bool) *ServersStoreImpl

func (*ServersStoreImpl) Add

func (*ServersStoreImpl) Exists

func (s *ServersStoreImpl) Exists(serverName string, namespace string) bool

func (*ServersStoreImpl) Get

func (s *ServersStoreImpl) Get(serverName string, namespace string) (KafkaIntentsAdmin, error)

func (*ServersStoreImpl) Remove

func (s *ServersStoreImpl) Remove(serverName string, namespace string)

type TopicToACLList

type TopicToACLList map[sarama.Resource][]sarama.Acl

Directories

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

Jump to

Keyboard shortcuts

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