standalone

package
v0.39.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunApp

func RunApp(version string, args []string) error

Types

type Config

type Config struct {
	URL     string
	Version string
	*gateway.Config
	Endpoint endpoint.Config
	Info     openapi3.Info
}

Config defines standalone app config

func NewConfigFromURL

func NewConfigFromURL(ctx context.Context, URL string) (*Config, error)

func NewService added in v0.15.4

func NewService(ctx context.Context, opts ...Option) (*gateway.Service, *Config, error)

func (*Config) Init

func (c *Config) Init(ctx context.Context)

init initialises config

func (*Config) Validate

func (c *Config) Validate() error

Validate validates config

type Option added in v0.8.0

type Option func(*Options)

Option represents standalone option

func WithConfig added in v0.8.0

func WithConfig(config *Config) Option

func WithConfigURL added in v0.8.0

func WithConfigURL(configURL string) Option

func WithOptions added in v0.8.0

func WithOptions(options ...gateway.Option) Option

WithOptions sets options

func WithUseSingleton added in v0.8.0

func WithUseSingleton(useSingleton bool) Option

WithUseSingleton sets a singleton

type Options

type Options struct {
	ConfigURL string `short:"c" long:"cfg" description:"config URIPrefix"`
	Version   bool   `short:"v" long:"version" description:"Version"`
	// contains filtered or unexported fields
}

Options represents standalone options

func NewOptions added in v0.8.0

func NewOptions(ctx context.Context, opts ...Option) (*Options, error)

func (*Options) UseSingleton added in v0.8.0

func (o *Options) UseSingleton() bool

type Server

type Server struct {
	http.Server
	Service *gateway.Service

	MCP *mcp.Server
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts ...Option) (*Server, error)

func NewWithURL

func NewWithURL(configURL, version string) (*Server, error)

NewWithURL create service with config URL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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