app

package
v0.2.0-dev0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeSSE    = "sse"    // Server-Sent Events mode
	ModeStdIO  = "stdio"  // Standard IO mode
	ModeHTTP   = "http"   // Streamable HTTP mode for MCP endpoint
	ModeHybrid = "hybrid" // Combined mode with both SSE and MCP endpoints

	DefaultPort    = "8080"
	DefaultHost    = "localhost"
	DefaultAppMode = "http"
)

Server mode constants

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config  *Config
	Version string
	// contains filtered or unexported fields
}

App represents the main application structure

func NewApp

func NewApp(logger *slog.Logger) *App

NewApp creates and initializes a new App instance NewApp creates a new application instance with logger

func (*App) LoadConfig

func (app *App) LoadConfig() error

LoadConfig loads and validates the application configuration

func (*App) RunServer

func (app *App) RunServer() error

RunServer initializes and starts the server based on the configured mode

func (*App) SetVersion

func (app *App) SetVersion(version string)

SetVersion sets the server version

type Config

type Config struct {
	KiteAPIKey    string
	KiteAPISecret string
	AppMode       string
	AppPort       string
	AppHost       string
	ExcludedTools string
}

Config holds the application configuration

type StatusPageData

type StatusPageData struct {
	Title   string
	Version string
	Mode    string
}

StatusPageData holds template data for the status page

Jump to

Keyboard shortcuts

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