Documentation
¶
Overview ¶
Package cfn contains functionality to handle CloudFormation resource providers imeplement in Go.
Index ¶
- func GetContextSession(ctx context.Context) (*session.Session, error)
- func GetContextValues(ctx context.Context) (map[string]interface{}, error)
- func SetContextSession(ctx context.Context, sess *session.Session) context.Context
- func SetContextValues(ctx context.Context, values map[string]interface{}) context.Context
- func Start(h Handler)
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContextSession ¶
GetContextSession unwraps a session from a given context
func GetContextValues ¶
GetContextValues unwraps callbackContextValues from a given context
func SetContextSession ¶
SetContextSession adds the supplied session to the given context
func SetContextValues ¶
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. |