gzip

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

GZIP Plugin

The gzip plugin is a plugin for the micro toolkit which enables gzipping of http response

Usage

Register the plugin before building Micro

package main

import (
	"github.com/micro/micro/plugin"
	"github.com/micro/go-plugins/micro/gzip"
)

func init() {
	plugin.Register(gzip.New())
}
Scoped to API

If you like to only apply the plugin for a specific component you can register it with that specifically. For example, below you'll see the plugin registered with the API.

package main

import (
	"github.com/micro/micro/api"
	"github.com/micro/go-plugins/micro/gzip"
)

func init() {
	api.Register(gzip.New())
}

Documentation

Overview

Package gzip is a micro plugin for gzipping http response

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin added in v0.18.0

func NewPlugin() plugin.Plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

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