middleware

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT, Apache-2.0 Imports: 2 Imported by: 0

README

Middleware

Middleware are composable layers that extend or modify the behavior of a Provider by implementing one or more of its functions. Each middleware layer operates on a set of common types and interfaces defined by this package.

Middleware enables features such as schema generation, request dispatching, and request cancellation.

For example, the schema middleware implements Provider.GetSchema based on options provided to schema.Wrap.

Layers

The middleware package contains various middleware layers with which to compose a provider.

Package Description
cancel Provides middleware to tie Pulumi's cancellation system to Go context.Context cancellation.
complexconfig (deprecated) Adds middleware for schema-informed complex configuration encoding/decoding.
context Allows systemic wrapping of context.Context before invoking a subsidiary provider.
dispatch Dispatches calls by type token to resource-level abstractions.
rpc Wraps a legacy provider (rpc.ResourceProviderServer) into a Provider.
schema Generates Pulumi schema based on resource and function abstractions.

Types

The layers operate on a set of common types defined by this package.

Type Description
CustomResource Defines a high-level interface for Pulumi custom resources.
ComponentResource Defines an interface for Pulumi component resources.
Invoke Defines an interface for Pulumi functions (invokes).

Documentation

Overview

Package middleware defines common interfaces multiple middleware components use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentResource

type ComponentResource interface {
	Construct(context.Context, p.ConstructRequest) (p.ConstructResponse, error)
}

ComponentResource provides a shared definition of a Pulumi component resource for middleware to use.

type CustomResource

CustomResource provides a shared high-level definition of a Pulumi custom resource.

type Invoke

type Invoke interface {
	Invoke(context.Context, p.InvokeRequest) (p.InvokeResponse, error)
}

Invoke provides a shared definition of a Pulumi function for middleware to use.

Directories

Path Synopsis
Package cancel provides a middle-ware that ties the Cancel gRPC call from Pulumi to Go's context.Context cancellation system.
Package cancel provides a middle-ware that ties the Cancel gRPC call from Pulumi to Go's context.Context cancellation system.
evict
Package evict is a helper package for github.com/sapslaj/mid/pkg/providerfw/middleware/cancel.
Package evict is a helper package for github.com/sapslaj/mid/pkg/providerfw/middleware/cancel.
Package complexconfig adds middleware for schema informed complex configuration encoding/decoding as a work-around for https://github.com/pulumi/pulumi/pull/15032.
Package complexconfig adds middleware for schema informed complex configuration encoding/decoding as a work-around for https://github.com/pulumi/pulumi/pull/15032.
Package context allows systemic wrapping of provider.Context before invoking a subsidiary provider.
Package context allows systemic wrapping of provider.Context before invoking a subsidiary provider.
Package dispatch provides a provider that dispatches calls by URN such as `Create` to resource level invocations.
Package dispatch provides a provider that dispatches calls by URN such as `Create` to resource level invocations.
Package rpc allows projecting a rpc.ResourceProviderServer into a p.Provider.
Package rpc allows projecting a rpc.ResourceProviderServer into a p.Provider.
Package schema provides a middleware to respond to GetSchema.
Package schema provides a middleware to respond to GetSchema.

Jump to

Keyboard shortcuts

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