nodes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeOperator

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

NodeOperator defines a node operations interface.

func NewOperator

func NewOperator(memory memory.Manager) (nop *NodeOperator, err error)

NewOperator initializes a k8s based kafka node operator with in cluster configuration

func (*NodeOperator) CreateNode

func (no *NodeOperator) CreateNode(ctx context.Context, app *meta.App) (*meta.Node, error)

CreateNode deploys a new node structure, if it's information is valid. Otherwise, returns an error

func (*NodeOperator) DeleteNode

func (no *NodeOperator) DeleteNode(ctx context.Context, nodeContext string, nodeName string) error

DeleteNode deletes node with given name, if it exists. Otherwise, returns an error

func (*NodeOperator) GetAllNodes

func (no *NodeOperator) GetAllNodes() []meta.Node

GetAllNodes returns a list of all the active nodes in the deployment, if there are any

func (*NodeOperator) GetNode

func (no *NodeOperator) GetNode(ctx context.Context, app *meta.App) (*meta.Node, error)

GetNode returns the node with the given name, if it exists. Otherwise, returns an error

func (*NodeOperator) Nodes

Nodes is a NodeOperatorInterface that provides methods for node manipulation

func (*NodeOperator) UpdateNode

func (no *NodeOperator) UpdateNode(ctx context.Context, app *meta.App) (*meta.Node, error)

UpdateNode updates a node that already exists, if the new structure is valid. Otherwise, returns an error.

Jump to

Keyboard shortcuts

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