Documentation
¶
Index ¶
- func ContextWithConfig(ctx context.Context, cfg FlashdutyConfig) context.Context
- func NewMCPServer(cfg FlashdutyConfig) (*server.MCPServer, error)
- func RunHttpServer(cfg HttpServerConfig) error
- func RunStdioServer(cfg StdioServerConfig) error
- type FlashdutyConfig
- type HttpServerConfig
- type StdioServerConfig
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 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
}
Click to show internal directories.
Click to hide internal directories.