plugin/

directory
v0.0.0-...-68b20d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0, MIT

README

Plugin

Gmqtt插件机制详解

How to write plugins

Gmqtt uses code generator to generate plugin template.

First, install the CLI tool:

# run under gmqtt project root directory. 
go install ./cmd/gmqctl 

Enjoy:

$ gmqctl gen plugin --help
code generator

Usage:
  gmqctl gen plugin [flags]

Examples:
The following command will generate a code template for the 'awesome' plugin, which makes use of OnBasicAuth and OnSubscribe hook and enables the configuration in ./plugin directory.

gmqctl gen plugin -n awesome -H OnBasicAuth,OnSubscribe -c true -o ./plugin

Flags:
  -c, --config          Whether the plugin needs a configuration.
  -h, --help            help for plugin
  -H, --hooks string    The hooks use by the plugin, multiple hooks are separated by ','
  -n, --name string     The plugin name.
  -o, --output string   The output directory.

Details...TODO

Directories

Path Synopsis
Package admin is a reverse proxy.
Package admin is a reverse proxy.
snowflake
Package snowflake provides a very simple Twitter snowflake generator and parser.
Package snowflake provides a very simple Twitter snowflake generator and parser.
Package auth is a reverse proxy.
Package auth is a reverse proxy.
Package federation is a reverse proxy.
Package federation is a reverse proxy.

Jump to

Keyboard shortcuts

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