nifi

package
v0.0.0-...-c5883cc Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionFromSchema

func ConnectionFromSchema(d *schema.ResourceData, connection *Connection) error

func ConnectionStartProcessor

func ConnectionStartProcessor(client *Client, processorId string) error

func ConnectionStopProcessor

func ConnectionStopProcessor(client *Client, processorId string) error

func ConnectionToSchema

func ConnectionToSchema(d *schema.ResourceData, connection *Connection) error

func ControllerServiceFromSchema

func ControllerServiceFromSchema(d *schema.ResourceData, controllerService *ControllerService) error

func ControllerServiceToSchema

func ControllerServiceToSchema(d *schema.ResourceData, controllerService *ControllerService) error

func ProcessGroupFromSchema

func ProcessGroupFromSchema(d *schema.ResourceData, processGroup *ProcessGroup) error

func ProcessGroupToSchema

func ProcessGroupToSchema(d *schema.ResourceData, processGroup *ProcessGroup) error

func ProcessorFromSchema

func ProcessorFromSchema(d *schema.ResourceData, processor *Processor) error

func ProcessorRemoveOverlappingConnections

func ProcessorRemoveOverlappingConnections(client *Client, processor *Processor) error

func ProcessorToSchema

func ProcessorToSchema(d *schema.ResourceData, processor *Processor) error

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

func ResourceConnection

func ResourceConnection() *schema.Resource

func ResourceConnectionCreate

func ResourceConnectionCreate(d *schema.ResourceData, meta interface{}) error

func ResourceConnectionDelete

func ResourceConnectionDelete(d *schema.ResourceData, meta interface{}) error

func ResourceConnectionDeleteInternal

func ResourceConnectionDeleteInternal(d *schema.ResourceData, meta interface{}) error

func ResourceConnectionExists

func ResourceConnectionExists(d *schema.ResourceData, meta interface{}) (bool, error)

func ResourceConnectionRead

func ResourceConnectionRead(d *schema.ResourceData, meta interface{}) error

func ResourceConnectionUpdate

func ResourceConnectionUpdate(d *schema.ResourceData, meta interface{}) error

func ResourceConnectionUpdateInternal

func ResourceConnectionUpdateInternal(d *schema.ResourceData, meta interface{}) error

func ResourceControllerService

func ResourceControllerService() *schema.Resource

func ResourceControllerServiceCreate

func ResourceControllerServiceCreate(d *schema.ResourceData, meta interface{}) error

func ResourceControllerServiceDelete

func ResourceControllerServiceDelete(d *schema.ResourceData, meta interface{}) error

func ResourceControllerServiceExists

func ResourceControllerServiceExists(d *schema.ResourceData, meta interface{}) (bool, error)

func ResourceControllerServiceRead

func ResourceControllerServiceRead(d *schema.ResourceData, meta interface{}) error

func ResourceControllerServiceUpdate

func ResourceControllerServiceUpdate(d *schema.ResourceData, meta interface{}) error

func ResourceProcessGroup

func ResourceProcessGroup() *schema.Resource

func ResourceProcessGroupCreate

func ResourceProcessGroupCreate(d *schema.ResourceData, meta interface{}) error

func ResourceProcessGroupDelete

func ResourceProcessGroupDelete(d *schema.ResourceData, meta interface{}) error

func ResourceProcessGroupExists

func ResourceProcessGroupExists(d *schema.ResourceData, meta interface{}) (bool, error)

func ResourceProcessGroupRead

func ResourceProcessGroupRead(d *schema.ResourceData, meta interface{}) error

func ResourceProcessGroupUpdate

func ResourceProcessGroupUpdate(d *schema.ResourceData, meta interface{}) error

func ResourceProcessor

func ResourceProcessor() *schema.Resource

func ResourceProcessorCreate

func ResourceProcessorCreate(d *schema.ResourceData, meta interface{}) error

func ResourceProcessorDelete

func ResourceProcessorDelete(d *schema.ResourceData, meta interface{}) error

func ResourceProcessorDeleteInternal

func ResourceProcessorDeleteInternal(d *schema.ResourceData, meta interface{}) error

func ResourceProcessorExists

func ResourceProcessorExists(d *schema.ResourceData, meta interface{}) (bool, error)

func ResourceProcessorRead

func ResourceProcessorRead(d *schema.ResourceData, meta interface{}) error

func ResourceProcessorUpdate

func ResourceProcessorUpdate(d *schema.ResourceData, meta interface{}) error

func ResourceProcessorUpdateInternal

func ResourceProcessorUpdateInternal(d *schema.ResourceData, meta interface{}) error

func SchemaParentGroupId

func SchemaParentGroupId() *schema.Schema

func SchemaPosition

func SchemaPosition() *schema.Schema

func SchemaRevision

func SchemaRevision() *schema.Schema

Types

type Client

type Client struct {
	Config Config
	Client *http.Client

	// The mutex is used by the plugin to prevent parallel execution of some update/delete operations.
	// There are scenarios when updating a connection involves modifying related processors and vice versa.
	// This breaks Terraform model to some extent but at the same time is unavoidable in NiFi world.
	// Currently only flows that involve cross-resource interactions are wrapped into lock/unlock sections.
	// Most of operations can still be performed in parallel.
	Lock sync.Mutex
}

func NewClient

func NewClient(config Config) *Client

func (*Client) CleanupNilProperties

func (c *Client) CleanupNilProperties(properties map[string]interface{}) error

func (*Client) CreateConnection

func (c *Client) CreateConnection(connection *Connection) error

func (*Client) CreateControllerService

func (c *Client) CreateControllerService(controllerService *ControllerService) error

func (*Client) CreateProcessGroup

func (c *Client) CreateProcessGroup(processGroup *ProcessGroup) error

func (*Client) CreateProcessor

func (c *Client) CreateProcessor(processor *Processor) error

func (*Client) DeleteConnection

func (c *Client) DeleteConnection(connection *Connection) error

func (*Client) DeleteControllerService

func (c *Client) DeleteControllerService(controllerService *ControllerService) error

func (*Client) DeleteProcessGroup

func (c *Client) DeleteProcessGroup(processGroup *ProcessGroup) error

func (*Client) DeleteProcessor

func (c *Client) DeleteProcessor(processor *Processor) error

func (*Client) DisableControllerService

func (c *Client) DisableControllerService(controllerService *ControllerService) error

func (*Client) DropConnectionData

func (c *Client) DropConnectionData(connection *Connection) error

func (*Client) EnableControllerService

func (c *Client) EnableControllerService(controllerService *ControllerService) error

func (*Client) GetConnection

func (c *Client) GetConnection(connectionId string) (*Connection, error)

func (*Client) GetControllerService

func (c *Client) GetControllerService(controllerServiceId string) (*ControllerService, error)

func (*Client) GetProcessGroup

func (c *Client) GetProcessGroup(processGroupId string) (*ProcessGroup, error)

func (*Client) GetProcessGroupConnections

func (c *Client) GetProcessGroupConnections(processGroupId string) (*Connections, error)

func (*Client) GetProcessor

func (c *Client) GetProcessor(processorId string) (*Processor, error)

func (*Client) JsonCall

func (c *Client) JsonCall(method string, url string, bodyIn interface{}, bodyOut interface{}) (int, error)

func (*Client) SetControllerServiceState

func (c *Client) SetControllerServiceState(controllerService *ControllerService, state string) error

func (*Client) SetProcessorState

func (c *Client) SetProcessorState(processor *Processor, state string) error

func (*Client) StartProcessor

func (c *Client) StartProcessor(processor *Processor) error

func (*Client) StopProcessor

func (c *Client) StopProcessor(processor *Processor) error

func (*Client) UpdateConnection

func (c *Client) UpdateConnection(connection *Connection) error

func (*Client) UpdateControllerService

func (c *Client) UpdateControllerService(controllerService *ControllerService) error

func (*Client) UpdateProcessGroup

func (c *Client) UpdateProcessGroup(processGroup *ProcessGroup) error

func (*Client) UpdateProcessor

func (c *Client) UpdateProcessor(processor *Processor) error

type Config

type Config struct {
	Host    string
	ApiPath string
}

Config is the structure that stores the configuration to talk to a NiFi API compatible host.

type Connection

type Connection struct {
	Revision  Revision            `json:"revision"`
	Component ConnectionComponent `json:"component"`
}

type ConnectionComponent

type ConnectionComponent struct {
	Id                    string         `json:"id,omitempty"`
	ParentGroupId         string         `json:"parentGroupId"`
	Source                ConnectionHand `json:"source"`
	Destination           ConnectionHand `json:"destination"`
	SelectedRelationships []string       `json:"selectedRelationships"`
	Bends                 []Position     `json:"bends"`
}

type ConnectionDropRequest

type ConnectionDropRequest struct {
	DropRequest struct {
		Id       string `json:"id"`
		Finished bool   `json:"finished"`
	} `json:"dropRequest"`
}

type ConnectionHand

type ConnectionHand struct {
	Type    string `json:"type"`
	Id      string `json:"id"`
	GroupId string `json:"groupId"`
}

type Connections

type Connections struct {
	Connections []Connection `json:"connections"`
}

type ControllerService

type ControllerService struct {
	Revision  Revision                   `json:"revision"`
	Component ControllerServiceComponent `json:"component"`
}

type ControllerServiceComponent

type ControllerServiceComponent struct {
	Id            string                 `json:"id,omitempty"`
	ParentGroupId string                 `json:"parentGroupId,omitempty"`
	Name          string                 `json:"name,omitempty"`
	Type          string                 `json:"type,omitempty"`
	State         string                 `json:"state,omitempty"`
	Properties    map[string]interface{} `json:"properties"`
}

type Position

type Position struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type ProcessGroup

type ProcessGroup struct {
	Revision  Revision              `json:"revision"`
	Component ProcessGroupComponent `json:"component"`
}

type ProcessGroupComponent

type ProcessGroupComponent struct {
	Id            string   `json:"id,omitempty"`
	ParentGroupId string   `json:"parentGroupId"`
	Name          string   `json:"name"`
	Position      Position `json:"position"`
}

type Processor

type Processor struct {
	Revision  Revision           `json:"revision"`
	Component ProcessorComponent `json:"component"`
}

func ProcessorStub

func ProcessorStub() *Processor

type ProcessorComponent

type ProcessorComponent struct {
	Id            string                  `json:"id,omitempty"`
	ParentGroupId string                  `json:"parentGroupId,omitempty"`
	Name          string                  `json:"name,omitempty"`
	Type          string                  `json:"type,omitempty"`
	Position      *Position               `json:"position,omitempty"`
	State         string                  `json:"state,omitempty"`
	Config        *ProcessorConfig        `json:"config,omitempty"`
	Relationships []ProcessorRelationship `json:"relationships,omitempty"`
}

type ProcessorConfig

type ProcessorConfig struct {
	SchedulingStrategy               string `json:"schedulingStrategy"`
	SchedulingPeriod                 string `json:"schedulingPeriod"`
	ConcurrentlySchedulableTaskCount int    `json:"concurrentlySchedulableTaskCount"`

	Properties                  map[string]interface{} `json:"properties"`
	AutoTerminatedRelationships []string               `json:"autoTerminatedRelationships"`
}

type ProcessorRelationship

type ProcessorRelationship struct {
	Name          string `json:"name"`
	AutoTerminate bool   `json:"autoTerminate"`
}

type Revision

type Revision struct {
	Version int `json:"version"`
}

Jump to

Keyboard shortcuts

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