disable_rpc

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Disable RPC Plugin

This plugin returns a 403 for /rpc. Nothing more.

Usage

Register the plugin before building Micro

package main

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

func init() {
	plugin.Register(rpc.NewPlugin())
}
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"
	rpc "github.com/micro/go-plugins/micro/disable_rpc"
)

func init() {
	api.Register(rpc.NewPlugin())
}

Documentation

Overview

Package disable_rpc disables the /rpc endpoint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin() plugin.Plugin

NewPlugin creates a new plugin expecting the service specified via flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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