disable_rpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

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