package
0.17.1
Repository: https://github.com/protocolone/go-plugins.git
Documentation: pkg.go.dev

# 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())
}

# Functions

NewPlugin creates a new plugin expecting the service specified via flag.