handlers

package
v0.0.0-...-3736fb9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package handlers provides an Ops type that has methods that implement bot.HandleFunc for various commands that could be sent to a bot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ops

type Ops struct {
	OpsClient *client.Ops
	API       *slack.Client
	SMClient  *socketmode.Client
}

Ops provides bot.HandleFunc methods that can reuse the connections to the Ops service.

func (Ops) ChangeSampling

func (o Ops) ChangeSampling(ctx context.Context, m bot.Message)

ChangeSampling changes the sampling type/rate on the server.

func (Ops) Help

func (o Ops) Help(ctx context.Context, m bot.Message)

Help returns help about various commands.

func (Ops) ListTraces

func (o Ops) ListTraces(ctx context.Context, m bot.Message)

ListTraces lists all the traces requested in a table that is output to the user.

func (Ops) Register

func (o Ops) Register(b *bot.Bot)

Register registers all the commands held in Ops with the bot.

func (Ops) ShowLogs

func (o Ops) ShowLogs(ctx context.Context, m bot.Message)

ShowLogs outputs the logs given a trace ID.

func (Ops) ShowTrace

func (o Ops) ShowTrace(ctx context.Context, m bot.Message)

ShowTrace gives the URL to a trace ID.

Jump to

Keyboard shortcuts

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