rds

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package rds implements the AWS RDS query-protocol as a server.Handler. Point the real aws-sdk-go-v2 RDS client at a Server registered with this handler and DBInstance/DBCluster/DBSnapshot operations work against an in-memory relationaldb driver.

RDS shares the AWS query wire shape with EC2 (POST + form-encoded body, XML response). To keep dispatch unambiguous, this handler's Matches predicate parses the form body once and only claims requests whose Action is one of the known RDS operations. The EC2 handler is the catch-all for all other query-protocol actions and so this handler MUST register first.

Index

Constants

View Source
const Namespace = "http://rds.amazonaws.com/doc/2014-10-31/"

Namespace is the XML namespace for AWS RDS responses.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves RDS query-protocol requests.

func New

New returns an RDS handler backed by db.

func (*Handler) Matches

func (*Handler) Matches(r *http.Request) bool

Matches returns true if the request looks like an AWS RDS query-protocol call (POST + form-encoded body whose Action is one of the known RDS operations). Calling ParseForm here caches the parsed form on the request so ServeHTTP can use it without re-reading the body.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP dispatches on Action. The form has already been parsed by Matches.

Jump to

Keyboard shortcuts

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