Documentation
¶
Overview ¶
Package redshift implements the AWS Redshift query-protocol as a server.Handler. Point the real aws-sdk-go-v2 Redshift client at a Server registered with this handler and Cluster/ClusterSnapshot operations work against an in-memory relationaldb driver.
Redshift shares the AWS query wire shape with EC2 and RDS (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 Redshift operations. Register order matters: RDS first (DBInstance/DBCluster verbs), then Redshift (Cluster verbs), then EC2 as the catch-all. Each handler's action set is mutually exclusive.
Index ¶
Constants ¶
const Namespace = "http://redshift.amazonaws.com/doc/2012-12-01/"
Namespace is the XML namespace for AWS Redshift responses.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves Redshift query-protocol requests.
func New ¶
func New(db rdbdriver.RelationalDB) *Handler
New returns a Redshift handler backed by db.
func (*Handler) Matches ¶
Matches returns true if the request looks like an AWS Redshift query-protocol call (POST + form-encoded body whose Action is one of the known Redshift operations). Calling ParseForm here caches the parsed form on the request so ServeHTTP can use it without re-reading the body.