nificlient

package
v0.2.0-release Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2020 Orange SA

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.package apis

Index

Constants

View Source
const (
	PRIMARY_NODE        = "Primary Node"
	CLUSTER_COORDINATOR = "Cluster Coordinator"
)

Variables

View Source
var ErrNifiClusterNodeNotFound = errors.New("The target node id doesn't exist in the cluster")
View Source
var ErrNifiClusterNotReturned200 = errors.New("non 200 response from NiFi cluster")
View Source
var ErrNifiClusterReturned404 = errors.New("404 response from NiFi cluster")
View Source
var ErrNoNodeClientsAvailable = errors.New("Cannot create a node client to perform actions")
View Source
var ErrNodeNotConnected = errors.New("The targeted node id disconnected")

Functions

This section is empty.

Types

type NifiClient

type NifiClient interface {
	// System func
	DescribeCluster() (*nigoapi.ClusterEntity, error)
	DisconnectClusterNode(nId int32) (*nigoapi.NodeEntity, error)
	ConnectClusterNode(nId int32) (*nigoapi.NodeEntity, error)
	OffloadClusterNode(nId int32) (*nigoapi.NodeEntity, error)
	RemoveClusterNode(nId int32) error
	GetClusterNode(nId int32) (*nigoapi.NodeEntity, error)
	RemoveClusterNodeFromClusterNodeId(nId string) error

	Build() error
}

NiFiClient is the exported interface for NiFi operations

func New

func New(opts *NifiConfig) NifiClient

func NewFromCluster

func NewFromCluster(k8sclient client.Client, cluster *v1alpha1.NifiCluster) (NifiClient, error)

NewFromCluster is a convenient wrapper around New() and ClusterConfig()

type NifiConfig

type NifiConfig struct {
	NodesURI  map[int32]string
	NifiURI   string
	UseSSL    bool
	TLSConfig *tls.Config

	OperationTimeout int64
	// contains filtered or unexported fields
}

NifiConfig are the options to creating a new ClusterAdmin client

func ClusterConfig

func ClusterConfig(client client.Client, cluster *v1alpha1.NifiCluster) (*NifiConfig, error)

ClusterConfig creates connection options from a NifiCluster CR

Jump to

Keyboard shortcuts

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