streamprocessor

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitiatingState = "INIT"
	CreatingState   = "CREATING"
	CreatedState    = "CREATED"
	StartedState    = "STARTED"
	StoppedState    = "STOPPED"
	DroppedState    = "DROPPED"
	FailedState     = "FAILED"
)
View Source
const StreamProcessorName = "stream_processor"

Variables

View Source
var DlqObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"coll":            types.StringType,
	"connection_name": types.StringType,
	"db":              types.StringType,
},
}
View Source
var OptionsObjectType = types.ObjectType{AttrTypes: map[string]attr.Type{
	"dlq": DlqObjectType,
}}

Functions

func ConvertOptionsToTF

func ConvertOptionsToTF(ctx context.Context, options *admin.StreamsOptions) (*types.Object, diag.Diagnostics)

func DataSource

func DataSource() datasource.DataSource

func PluralDataSource

func PluralDataSource() datasource.DataSource

func Resource

func Resource() resource.Resource

func ResourceSchema

func ResourceSchema(ctx context.Context) schema.Schema

func WaitStateTransition

func WaitStateTransition(ctx context.Context, requestParams *admin.GetStreamProcessorApiParams, client admin.StreamsApi, pendingStates, desiredStates []string) (*admin.StreamsProcessorWithStats, error)

Types

type StreamProccesorDS

type StreamProccesorDS struct {
	config.DSCommon
}

func (*StreamProccesorDS) Read

func (*StreamProccesorDS) Schema

type TFDlqModel

type TFDlqModel struct {
	Coll           types.String `tfsdk:"coll"`
	ConnectionName types.String `tfsdk:"connection_name"`
	DB             types.String `tfsdk:"db"`
}

type TFOptionsModel

type TFOptionsModel struct {
	Dlq types.Object `tfsdk:"dlq"`
}

type TFStreamProcessorDSModel

type TFStreamProcessorDSModel struct {
	ID            types.String `tfsdk:"id"`
	InstanceName  types.String `tfsdk:"instance_name"`
	Options       types.Object `tfsdk:"options"`
	Pipeline      types.String `tfsdk:"pipeline"`
	ProcessorName types.String `tfsdk:"processor_name"`
	ProjectID     types.String `tfsdk:"project_id"`
	State         types.String `tfsdk:"state"`
	Stats         types.String `tfsdk:"stats"`
}

func NewTFStreamprocessorDSModel

func NewTFStreamprocessorDSModel(ctx context.Context, projectID, instanceName string, apiResp *admin.StreamsProcessorWithStats) (*TFStreamProcessorDSModel, diag.Diagnostics)

type TFStreamProcessorRSModel

type TFStreamProcessorRSModel struct {
	InstanceName  types.String       `tfsdk:"instance_name"`
	Options       types.Object       `tfsdk:"options"`
	Pipeline      fwtypes.JSONString `tfsdk:"pipeline"`
	ProcessorID   types.String       `tfsdk:"id"`
	ProcessorName types.String       `tfsdk:"processor_name"`
	ProjectID     types.String       `tfsdk:"project_id"`
	State         types.String       `tfsdk:"state"`
	Stats         types.String       `tfsdk:"stats"`
}

func NewStreamProcessorWithStats

func NewStreamProcessorWithStats(ctx context.Context, projectID, instanceName string, apiResp *admin.StreamsProcessorWithStats) (*TFStreamProcessorRSModel, diag.Diagnostics)

type TFStreamProcessorsDSModel

type TFStreamProcessorsDSModel struct {
	ProjectID    types.String               `tfsdk:"project_id"`
	InstanceName types.String               `tfsdk:"instance_name"`
	Results      []TFStreamProcessorDSModel `tfsdk:"results"`
}

func NewTFStreamProcessors

func NewTFStreamProcessors(ctx context.Context,
	streamProcessorsConfig *TFStreamProcessorsDSModel,
	sdkResults []admin.StreamsProcessorWithStats) (*TFStreamProcessorsDSModel, diag.Diagnostics)

Jump to

Keyboard shortcuts

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