manael

package module
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 16 Imported by: 0

README

Manael

GoDoc CircleCI

A simple HTTP proxy for processing images.

Installation

Usage

$ manael -http=:8080 -upstream_url=http://localhost:9000

License

MIT

Documentation

Overview

Package manael provides HTTP handler for processing images.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy added in v1.4.1

type Proxy struct {
	Transport http.RoundTripper
}

A Proxy responds to an HTTP request.

func NewServeProxy

func NewServeProxy(u string) *Proxy

NewServeProxy returns a new Proxy given a upstream URL

Example
package main

import (
	"log"
	"net/http"

	"manael.org/x/manael"
)

func main() {
	p := manael.NewServeProxy("http://localhost:9000")

	err := http.ListenAndServe(":8080", p)
	if err != nil {
		log.Fatal(err)
	}
}
Output:

func (*Proxy) ServeHTTP added in v1.4.1

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Transport added in v1.4.1

type Transport struct {
	UpstreamURL string

	Base http.RoundTripper
}

Transport is an http.RoundTripper.

func (*Transport) RoundTrip added in v1.4.1

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip responds to an converted image.

Directories

Path Synopsis
cmd
manael
Manael is a proxy server for processing images.
Manael is a proxy server for processing images.

Jump to

Keyboard shortcuts

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