redshift

package
v1.6.3 Latest Latest
Warning

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

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

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

View Source
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

New returns a Redshift handler backed by db.

func (*Handler) Matches

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

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.

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