manael

package module
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 15 Imported by: 0

README

Manael

GoDoc Go Codecov

Manael is 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

func Decode

func Decode(r io.Reader) (image.Image, error)

Decode returns an image.Image.

func Encode

func Encode(w io.Writer, m image.Image, t string) error

Encode writes the Image m to w in the format specified by Content-Type t.

func NewServeProxy

func NewServeProxy(u *url.URL) http.Handler

NewServeProxy returns a new Proxy given a upstream URL

Example
u, err := url.Parse("http://localhost:9000")
if err != nil {
	log.Fatal(err)
}

p := manael.NewServeProxy(u)

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

Types

This section is empty.

Directories

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

Jump to

Keyboard shortcuts

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