datastream

package
v6.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package datastream contains implementation for Akamai Terraform sub-provider responsible for providing scalable, low latency streaming of data

Index

Constants

View Source
const (
	// DefaultUploadFilePrefix specifies default upload file prefix for supported connectors
	DefaultUploadFilePrefix = "ak"

	// DefaultUploadFileSuffix specifies default upload file suffix for supported connectors
	DefaultUploadFileSuffix = "ds"
)

Variables

View Source
var (
	// PollForActivationStatusChangeInterval defines retry interval for getting status of a pending change
	PollForActivationStatusChangeInterval = 10 * time.Minute

	// ExactlyOneConnectorRule defines connector fields names
	ExactlyOneConnectorRule = []string{
		"azure_connector",
		"datadog_connector",
		"elasticsearch_connector",
		"gcs_connector",
		"https_connector",
		"loggly_connector",
		"new_relic_connector",
		"oracle_connector",
		"s3_connector",
		"splunk_connector",
		"sumologic_connector",
	}

	// ConnectorsWithoutFilenameOptionsConfig defines connectors without option to configure prefix and suffix
	ConnectorsWithoutFilenameOptionsConfig = []string{
		"datadog_connector",
		"elasticsearch_connector",
		"https_connector",
		"loggly_connector",
		"new_relic_connector",
		"splunk_connector",
		"sumologic_connector",
	}

	// DatastreamResourceTimeout is the default timeout for the resource operations (max activation time + polling interval)
	DatastreamResourceTimeout = 180 * time.Minute
)

Functions

func ConfigToSet

func ConfigToSet(cfg datastream.DeliveryConfiguration) []map[string]interface{}

ConfigToSet converts Config struct to set

func ConnectorToMap

func ConnectorToMap(connector datastream.Destination, d *schema.ResourceData) (string, map[string]interface{}, error)

ConnectorToMap converts ConnectorDetails struct to map of properties

func DataSetFieldsToList

func DataSetFieldsToList(dataSetFields []datastream.DataSetField) []int

DataSetFieldsToList converts slice of dataSetFields to slice of ints

func DatasetFieldListToDatasetFields

func DatasetFieldListToDatasetFields(list []interface{}) []datastream.DatasetFieldID

DatasetFieldListToDatasetFields converts schema.Set to slice of DatasetFieldId

func FilePrefixSuffixSet

func FilePrefixSuffixSet(httpsBaseConnectorName string, config *datastream.DeliveryConfiguration) (*datastream.DeliveryConfiguration, error)

FilePrefixSuffixSet is used to set the blank value for prefix and suffix for https based destination as https based destination does not support prefix and suffix

func FrequencyToSet

func FrequencyToSet(freq datastream.Frequency) []map[string]interface{}

FrequencyToSet converts Frequency struct to map

func GetAzureConnector

func GetAzureConnector(props map[string]interface{}) datastream.AbstractConnector

GetAzureConnector builds AzureConnector structure

func GetConfig

func GetConfig(set *schema.Set) (*datastream.DeliveryConfiguration, error)

GetConfig builds Config structure

func GetConnectorNameWithOutFilePrefixSuffix

func GetConnectorNameWithOutFilePrefixSuffix(d *schema.ResourceData, keys []string) string

GetConnectorNameWithOutFilePrefixSuffix Returns destination name which does not contain the file prefix and suffix

func GetConnectors

func GetConnectors(d *schema.ResourceData, keys []string) (datastream.AbstractConnector, error)

GetConnectors builds Connectors list

func GetDatadogConnector

func GetDatadogConnector(props map[string]interface{}) datastream.AbstractConnector

GetDatadogConnector builds DatadogConnector structure

func GetElasticsearchConnector

func GetElasticsearchConnector(props map[string]interface{}) datastream.AbstractConnector

GetElasticsearchConnector builds ElasticsearchConnector structure

func GetFrequency

func GetFrequency(set *schema.Set) (*datastream.Frequency, error)

GetFrequency builds Frequency structure

func GetGCSConnector

func GetGCSConnector(props map[string]interface{}) datastream.AbstractConnector

GetGCSConnector builds GCSConnector structure

func GetHTTPSConnector

func GetHTTPSConnector(props map[string]interface{}) datastream.AbstractConnector

GetHTTPSConnector builds CustomHTTPSConnector structure

func GetLogglyConnector

func GetLogglyConnector(props map[string]interface{}) datastream.AbstractConnector

GetLogglyConnector builds LogglyConnector structure

func GetNewRelicConnector

func GetNewRelicConnector(props map[string]interface{}) datastream.AbstractConnector

GetNewRelicConnector builds NewRelicConnector structure

func GetOracleConnector

func GetOracleConnector(props map[string]interface{}) datastream.AbstractConnector

GetOracleConnector builds OracleCloudStorageConnector structure

func GetPropertiesList

func GetPropertiesList(properties []interface{}) ([]datastream.PropertyID, error)

GetPropertiesList converts propertyIDs with and without "prp_" prefix to slice of ints

func GetS3Connector

func GetS3Connector(props map[string]interface{}) datastream.AbstractConnector

GetS3Connector builds S3Connector structure

func GetSplunkConnector

func GetSplunkConnector(props map[string]interface{}) datastream.AbstractConnector

GetSplunkConnector builds SplunkConnector structure

func GetSumoLogicConnector

func GetSumoLogicConnector(props map[string]interface{}) datastream.AbstractConnector

GetSumoLogicConnector builds SumoLogicConnector structure

func InterfaceSliceToIntSlice

func InterfaceSliceToIntSlice(list []interface{}) []int

InterfaceSliceToIntSlice converts schema.Set to slice of ints

func MapAzureConnector

func MapAzureConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapAzureConnector selects fields needed for AzureConnector

func MapDatadogConnector

func MapDatadogConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapDatadogConnector selects fields needed for DatadogConnector

func MapElasticsearchConnector

func MapElasticsearchConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapElasticsearchConnector selects fields needed for ElasticsearchConnector

func MapGCSConnector

func MapGCSConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapGCSConnector selects fields needed for GCSConnector

func MapHTTPSConnector

func MapHTTPSConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapHTTPSConnector selects fields needed for CustomHTTPSConnector

func MapLogglyConnector

func MapLogglyConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapLogglyConnector selects fields needed for LogglyConnector

func MapNewRelicConnector

func MapNewRelicConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapNewRelicConnector selects fields needed for NewRelicConnector

func MapOracleConnector

func MapOracleConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapOracleConnector selects fields needed for OracleCloudStorageConnector

func MapS3Connector

func MapS3Connector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapS3Connector selects fields needed for S3Connector

func MapSplunkConnector

func MapSplunkConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapSplunkConnector selects fields needed for SplunkConnector

func MapSumoLogicConnector

func MapSumoLogicConnector(c datastream.Destination, state map[string]interface{}) map[string]interface{}

MapSumoLogicConnector selects fields needed for SumoLogicConnector

func PropertyToList

func PropertyToList(properties []datastream.Property) []string

PropertyToList converts slice of Properties to slice of ints

func StreamIDToPapiJSON

func StreamIDToPapiJSON(id int64) string

StreamIDToPapiJSON generates PAPI JSON with given id of a stream

Types

type Subprovider

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

Subprovider gathers datastream resources and data sources

func NewSubprovider

func NewSubprovider(opts ...option) *Subprovider

NewSubprovider returns a new datastream subprovider

func (*Subprovider) Client

func (p *Subprovider) Client(meta meta.Meta) datastream.DS

Client returns the DS interface

func (*Subprovider) FrameworkDataSources

func (p *Subprovider) FrameworkDataSources() []func() datasource.DataSource

FrameworkDataSources returns the datastream data sources implemented using terraform-plugin-framework

func (*Subprovider) FrameworkResources

func (p *Subprovider) FrameworkResources() []func() resource.Resource

FrameworkResources returns the datastream resources implemented using terraform-plugin-framework

func (*Subprovider) SDKDataSources

func (p *Subprovider) SDKDataSources() map[string]*schema.Resource

SDKDataSources returns the datastream data sources implemented using terraform-plugin-sdk

func (*Subprovider) SDKResources

func (p *Subprovider) SDKResources() map[string]*schema.Resource

SDKResources returns the datastream resources implemented using terraform-plugin-sdk

Jump to

Keyboard shortcuts

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