flashduty

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithConfig

func ContextWithConfig(ctx context.Context, cfg FlashdutyConfig) context.Context

ContextWithConfig adds the Flashduty config to the context.

func NewMCPServer

func NewMCPServer(cfg FlashdutyConfig) (*server.MCPServer, error)

func RunHttpServer

func RunHttpServer(cfg HttpServerConfig) error

func RunStdioServer

func RunStdioServer(cfg StdioServerConfig) error

RunStdioServer is not concurrent safe.

Types

type FlashdutyConfig

type FlashdutyConfig struct {
	// Version of the server
	Version string

	// Flashduty API Base URL
	BaseURL string

	// Flashduty APP Key to authenticate with the Flashduty API
	APPKey string

	// EnabledToolsets is a list of toolsets to enable
	EnabledToolsets []string

	// ReadOnly indicates if we should only offer read-only tools
	ReadOnly bool

	// Translator provides translated text for the server tooling
	Translator translations.TranslationHelperFunc
}

func ConfigFromContext

func ConfigFromContext(ctx context.Context) (FlashdutyConfig, bool)

ConfigFromContext returns the Flashduty config from the context.

type HttpServerConfig

type HttpServerConfig struct {
	// Version of the server
	Version string
	// Commit of the server
	Commit string
	// Date of the server
	Date string

	// Flashduty API Base URL
	BaseURL string

	// Port to listen on
	Port string

	// Path to the log file if not stderr
	LogFilePath string
}

type StdioServerConfig

type StdioServerConfig struct {
	// Version of the server
	Version string

	// Flashduty API Base URL
	BaseURL string

	// Flashduty APP Key to authenticate with the Flashduty API
	APPKey string

	// EnabledToolsets is a list of toolsets to enable
	EnabledToolsets []string

	// ReadOnly indicates if we should only register read-only tools
	ReadOnly bool

	// ExportTranslations indicates if we should export translations
	ExportTranslations bool

	// EnableCommandLogging indicates if we should log commands
	EnableCommandLogging bool

	// Path to the log file if not stderr
	LogFilePath string
}

Jump to

Keyboard shortcuts

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