bot

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package bot is a Hubot style bot that sits a microservice environment

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default server name
	Name = "go.micro.bot"
	// Namespace for commands
	Namespace = "go.micro.bot"
)
View Source
var App *cli.App
View Source
var DefaultFlags = []cli.Flag{
	cli.StringFlag{
		Name:   "server_name",
		EnvVar: "MICRO_SERVER_NAME",
		Usage:  "Name of the server. go.micro.srv.example",
	},
	cli.StringFlag{
		Name:  "inputs",
		Usage: "Inputs to load on startup",
	},
	cli.StringFlag{
		Name:   "namespace",
		Usage:  "Set the namespace used by the bot to find commands e.g. com.example.bot",
		EnvVar: "MICRO_BOT_NAMESPACE",
	},
	cli.IntFlag{
		Name:   "register_ttl",
		EnvVar: "MICRO_REGISTER_TTL",
		Usage:  "Register TTL in seconds",
	},
	cli.IntFlag{
		Name:   "register_interval",
		EnvVar: "MICRO_REGISTER_INTERVAL",
		Usage:  "Register interval in seconds",
	},
	cli.StringFlag{
		Name:   "registry_address",
		EnvVar: "MICRO_REGISTRY_ADDRESS",
		Usage:  "The registry address and port <address>:<port>",
	},
	cli.StringFlag{
		Name:   "configuration_file",
		Usage:  "The yaml configuration file for the service being loaded",
		Value:  "/etc/auth-srv/application.yaml",
		EnvVar: "CONFIGURATION_FILE",
	},
}

Functions

func Plugins

func Plugins() []plugin.Plugin

Plugins lists the bot plugins

func Register

func Register(pl plugin.Plugin) error

Register registers an bot plugin

func Run

func Run(ctx *cli.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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