znodecontroller

package
v0.0.0-...-a037f51 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ZNodeDeleteFinalizer = "znode.zncdata.dev/delete-znode"

Variables

View Source
var ErrZookeeperCluster = errors.New("zookeeper cluster get failed")

Functions

func GetConnect

func GetConnect(zkList []string) (conn *zk.Conn, err error)

Types

type ZNodeReconciler

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

func NewZNodeReconciler

func NewZNodeReconciler(
	scheme *runtime.Scheme,
	instance *zkv1alpha1.ZookeeperZnode,
	client ctrlclient.Client,
	zkSecurity *security.ZookeeperSecurity,
) *ZNodeReconciler

NewZNodeReconciler new a ZNodeReconciler

type ZkClient

type ZkClient struct {
	// The address of the zookeeper server
	Address string

	// The zk client
	Client *zk.Conn
}

func NewZkClient

func NewZkClient(address string) (*ZkClient, error)

NewZkClient new zk client

func (ZkClient) Close

func (z ZkClient) Close()

func (ZkClient) Create

func (z ZkClient) Create(path string, data []byte) error

func (ZkClient) Delete

func (z ZkClient) Delete(path string) error

func (ZkClient) Exists

func (z ZkClient) Exists(path string) (bool, error)

type ZkClientRepository

type ZkClientRepository interface {
	// Create a znode with the given path and data
	Create(path string, data []byte) error

	// Delete the znode with the given path
	Delete(path string) error

	// Close the connection
	Close()

	// Exists weather the znode with the given path exists
	Exists(path string) (bool, error)
}

type ZnodeDeleteFinalizer

type ZnodeDeleteFinalizer struct {
	Chroot    string
	ZkCluster *zkv1alpha1.ZookeeperCluster
	// contains filtered or unexported fields
}

func (ZnodeDeleteFinalizer) Finalize

type ZookeeperZnodeReconciler

type ZookeeperZnodeReconciler struct {
	ctrlclient.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

ZookeeperZnodeReconciler reconciles a ZookeeperZnode object

func (*ZookeeperZnodeReconciler) Reconcile

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile

func (*ZookeeperZnodeReconciler) SetupWithManager

func (r *ZookeeperZnodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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