cfn

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 30

Documentation

Overview

Package cfn contains functionality to handle CloudFormation resource providers imeplement in Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContextSession

func GetContextSession(ctx context.Context) (*session.Session, error)

GetContextSession unwraps a session from a given context

func GetContextValues

func GetContextValues(ctx context.Context) (map[string]interface{}, error)

GetContextValues unwraps callbackContextValues from a given context

func SetContextSession

func SetContextSession(ctx context.Context, sess *session.Session) context.Context

SetContextSession adds the supplied session to the given context

func SetContextValues

func SetContextValues(ctx context.Context, values map[string]interface{}) context.Context

SetContextValues creates a context to pass to handlers

func Start

func Start(h Handler)

Start is the entry point called from a resource's main function

We define two lambda entry points; MakeEventFunc is the entry point to all invocations of a custom resource and MakeTestEventFunc is the entry point that allows the CLI's contract testing framework to invoke the resource's CRUDL handlers.

Types

type Handler

type Handler interface {
	Create(request handler.Request) handler.ProgressEvent
	Read(request handler.Request) handler.ProgressEvent
	Update(request handler.Request) handler.ProgressEvent
	Delete(request handler.Request) handler.ProgressEvent
	List(request handler.Request) handler.ProgressEvent
}

Handler is the interface that all resource providers must implement

Each method of Handler maps directly to a CloudFormation action. Every action must return a progress event containing details of any actions that were undertaken by the resource provider or of any error that occurred during operation.

Directories

Path Synopsis
Package cfnerr defines a custom error type used by the RPDK Go plugin.
Package cfnerr defines a custom error type used by the RPDK Go plugin.
Package credentials providers helper functions for dealing with AWS credentials passed in to resource providers from CloudFormation.
Package credentials providers helper functions for dealing with AWS credentials passed in to resource providers from CloudFormation.
Package encoding defines types and functions used for dealing with stringified-JSON.
Package encoding defines types and functions used for dealing with stringified-JSON.
Package handler contains types that are passed into and out of a resource provider's CRUDL functions.
Package handler contains types that are passed into and out of a resource provider's CRUDL functions.
Package metrics handles sending metrics about resource providers to CloudWatch
Package metrics handles sending metrics about resource providers to CloudWatch
Package scheduler handles rescheduling resource provider handlers when required by in_progress events.
Package scheduler handles rescheduling resource provider handlers when required by in_progress events.

Jump to

Keyboard shortcuts

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