Documentation ¶
Index ¶
Constants ¶
View Source
const ( PRIMARY_NODE = "Primary Node" CLUSTER_COORDINATOR = "Cluster Coordinator" // ConnectNodeAction states that the NiFi node is connecting to the NiFi Cluster. CONNECTING_STATUS = "CONNECTING" // ConnectStatus states that the NiFi node is connected to the NiFi Cluster. CONNECTED_STATUS = "CONNECTED" // DisconnectNodeAction states that the NiFi node is disconnecting from NiFi Cluster. DISCONNECTING_STATUS = "DISCONNECTING" // DisconnectStatus states that the NiFi node is disconnected from NiFi Cluster. DISCONNECTED_STATUS = "DISCONNECTED" // OffloadNodeAction states that the NiFi node is offloading data to NiFi Cluster. OFFLOADING_STATUS = "OFFLOADING" // OffloadStatus states that the NiFi node offloaded data to NiFi Cluster. OFFLOADED_STATUS = "OFFLOADED" // RemoveNodeAction states that the NiFi node is removing from NiFi Cluster. REMOVING_STATUS = "REMOVING" // RemoveStatus states that the NiFi node is removed from NiFi Cluster. REMOVED_STATUS = "REMOVED" )
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 ErrNifiClusterNotReturned201 = errors.New("non 201 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 { // Access func CreateAccessTokenUsingBasicAuth(username, password string, nodeId int32) (*string, error) // System func DescribeCluster() (*nigoapi.ClusterEntity, error) DescribeClusterFromNodeId(nodeId int32) (*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 // Registry client func GetRegistryClient(id string) (*nigoapi.FlowRegistryClientEntity, error) CreateRegistryClient(entity nigoapi.FlowRegistryClientEntity) (*nigoapi.FlowRegistryClientEntity, error) UpdateRegistryClient(entity nigoapi.FlowRegistryClientEntity) (*nigoapi.FlowRegistryClientEntity, error) RemoveRegistryClient(entity nigoapi.FlowRegistryClientEntity) error // Flow client func GetFlow(id string) (*nigoapi.ProcessGroupFlowEntity, error) UpdateFlowControllerServices(entity nigoapi.ActivateControllerServicesEntity) (*nigoapi.ActivateControllerServicesEntity, error) UpdateFlowProcessGroup(entity nigoapi.ScheduleComponentsEntity) (*nigoapi.ScheduleComponentsEntity, error) GetFlowControllerServices(id string) (*nigoapi.ControllerServicesEntity, error) // Drop request func GetDropRequest(connectionId, id string) (*nigoapi.DropRequestEntity, error) CreateDropRequest(connectionId string) (*nigoapi.DropRequestEntity, error) // Process Group func GetProcessGroup(id string) (*nigoapi.ProcessGroupEntity, error) CreateProcessGroup(entity nigoapi.ProcessGroupEntity, pgParentId string) (*nigoapi.ProcessGroupEntity, error) UpdateProcessGroup(entity nigoapi.ProcessGroupEntity) (*nigoapi.ProcessGroupEntity, error) RemoveProcessGroup(entity nigoapi.ProcessGroupEntity) error CreateConnection(entity nigoapi.ConnectionEntity) (*nigoapi.ConnectionEntity, error) // Version func CreateVersionUpdateRequest(pgId string, entity nigoapi.VersionControlInformationEntity) (*nigoapi.VersionedFlowUpdateRequestEntity, error) GetVersionUpdateRequest(id string) (*nigoapi.VersionedFlowUpdateRequestEntity, error) CreateVersionRevertRequest(pgId string, entity nigoapi.VersionControlInformationEntity) (*nigoapi.VersionedFlowUpdateRequestEntity, error) GetVersionRevertRequest(id string) (*nigoapi.VersionedFlowUpdateRequestEntity, error) // Snippet func CreateSnippet(entity nigoapi.SnippetEntity) (*nigoapi.SnippetEntity, error) UpdateSnippet(entity nigoapi.SnippetEntity) (*nigoapi.SnippetEntity, error) // Processor func UpdateProcessor(entity nigoapi.ProcessorEntity) (*nigoapi.ProcessorEntity, error) UpdateProcessorRunStatus(id string, entity nigoapi.ProcessorRunStatusEntity) (*nigoapi.ProcessorEntity, error) GetProcessor(id string) (*nigoapi.ProcessorEntity, error) // Input port func UpdateInputPortRunStatus(id string, entity nigoapi.PortRunStatusEntity) (*nigoapi.ProcessorEntity, error) GetInputPort(id string) (*nigoapi.PortEntity, error) // Output port func UpdateOutputPortRunStatus(id string, entity nigoapi.PortRunStatusEntity) (*nigoapi.ProcessorEntity, error) GetOutputPort(id string) (*nigoapi.PortEntity, error) // Parameter context func GetParameterContexts() ([]nigoapi.ParameterContextEntity, error) GetParameterContext(id string) (*nigoapi.ParameterContextEntity, error) CreateParameterContext(entity nigoapi.ParameterContextEntity) (*nigoapi.ParameterContextEntity, error) RemoveParameterContext(entity nigoapi.ParameterContextEntity) error CreateParameterContextUpdateRequest(contextId string, entity nigoapi.ParameterContextEntity) (*nigoapi.ParameterContextUpdateRequestEntity, error) GetParameterContextUpdateRequest(contextId, id string) (*nigoapi.ParameterContextUpdateRequestEntity, error) // User groups func GetUserGroups() ([]nigoapi.UserGroupEntity, error) GetUserGroup(id string) (*nigoapi.UserGroupEntity, error) CreateUserGroup(entity nigoapi.UserGroupEntity) (*nigoapi.UserGroupEntity, error) UpdateUserGroup(entity nigoapi.UserGroupEntity) (*nigoapi.UserGroupEntity, error) RemoveUserGroup(entity nigoapi.UserGroupEntity) error // User func GetUsers() ([]nigoapi.UserEntity, error) GetUser(id string) (*nigoapi.UserEntity, error) CreateUser(entity nigoapi.UserEntity) (*nigoapi.UserEntity, error) UpdateUser(entity nigoapi.UserEntity) (*nigoapi.UserEntity, error) RemoveUser(entity nigoapi.UserEntity) error // Policies func GetAccessPolicy(action, resource string) (*nigoapi.AccessPolicyEntity, error) CreateAccessPolicy(entity nigoapi.AccessPolicyEntity) (*nigoapi.AccessPolicyEntity, error) UpdateAccessPolicy(entity nigoapi.AccessPolicyEntity) (*nigoapi.AccessPolicyEntity, error) RemoveAccessPolicy(entity nigoapi.AccessPolicyEntity) error // Reportingtask func GetReportingTask(id string) (*nigoapi.ReportingTaskEntity, error) CreateReportingTask(entity nigoapi.ReportingTaskEntity) (*nigoapi.ReportingTaskEntity, error) UpdateReportingTask(entity nigoapi.ReportingTaskEntity) (*nigoapi.ReportingTaskEntity, error) UpdateRunStatusReportingTask(id string, entity nigoapi.ReportingTaskRunStatusEntity) (*nigoapi.ReportingTaskEntity, error) RemoveReportingTask(entity nigoapi.ReportingTaskEntity) error // ControllerConfig func GetControllerConfig() (*nigoapi.ControllerConfigurationEntity, error) UpdateControllerConfig(entity nigoapi.ControllerConfigurationEntity) (*nigoapi.ControllerConfigurationEntity, error) // Connections func GetConnection(id string) (*nigoapi.ConnectionEntity, error) UpdateConnection(entity nigoapi.ConnectionEntity) (*nigoapi.ConnectionEntity, error) DeleteConnection(entity nigoapi.ConnectionEntity) error Build() error }
NiFiClient is the exported interface for NiFi operations.
func New ¶
func New(opts *clientconfig.NifiConfig, logger *zap.Logger) NifiClient
func NewFromConfig ¶
func NewFromConfig(opts *clientconfig.NifiConfig, logger *zap.Logger) (NifiClient, error)
NewFromConfig is a convenient wrapper around New() and ClusterConfig().
Source Files ¶
Click to show internal directories.
Click to hide internal directories.