bot

package
v0.0.0-...-0f6a5af Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelpIntro = "Hi! I respond to the following commands:\n"
	// TODO: (sperry) this should be auto generated based on what we allow users to do via the bot
	HelpDetails = "help: Print this message\nhello: I will greet you with Hello, World!"
)
View Source
const (
	Name = "clutch.service.bot"
)

Variables

This section is empty.

Functions

func New

func New(cfg *anypb.Any, logger *zap.Logger, scope tally.Scope) (service.Service, error)

func TrimRedundantSpaces

func TrimRedundantSpaces(text string) string

TrimRedundantSpaces replaces trailing/leading and duplicate whitespaces

Types

type Service

type Service interface {
	// MatchCommand takes a user's command to the bot (ie describe pod foo-cluster/foo-namespace/foo-pod)
	// and returns the appropriate bot reply
	MatchCommand(ctx context.Context, command string) (reply string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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