Documentation
¶
Index ¶
- func DetectCommand(command string) (string, error)
- func ParseCommandLine(input string) (string, []string)
- type BackendHandle
- func (bh *BackendHandle) Close() error
- func (bh *BackendHandle) Forward(req *protocol.Request) (*protocol.Response, error)
- func (bh *BackendHandle) HealthCheck()
- func (bh *BackendHandle) IsHealthy() bool
- func (bh *BackendHandle) Name() string
- func (bh *BackendHandle) Tools() ([]protocol.ToolDefinition, error)
- type BackendMetadata
- type DiscoveredManifest
- type HealthChecker
- type Registry
- func (r *Registry) AddBackend(ctx context.Context, cfg config.BackendConfig) error
- func (r *Registry) AggregatedTools() []protocol.ToolDefinition
- func (r *Registry) All() []*BackendHandle
- func (r *Registry) BackendCount() int
- func (r *Registry) Get(name string) *BackendHandle
- func (r *Registry) HealthCheckAll()
- func (r *Registry) HealthCheckAndRestart()
- func (r *Registry) InitBackends(ctx context.Context) error
- func (r *Registry) Metadata() []BackendMetadata
- func (r *Registry) Reload(cfg *config.Config) error
- func (r *Registry) Remove(name string)
- func (r *Registry) SetBaseContext(ctx context.Context)
- func (r *Registry) StartAll(ctx context.Context) error
- func (r *Registry) StopAll() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectCommand ¶
func ParseCommandLine ¶
Types ¶
type BackendHandle ¶
type BackendHandle struct {
// contains filtered or unexported fields
}
func (*BackendHandle) Close ¶
func (bh *BackendHandle) Close() error
func (*BackendHandle) HealthCheck ¶
func (bh *BackendHandle) HealthCheck()
func (*BackendHandle) IsHealthy ¶
func (bh *BackendHandle) IsHealthy() bool
func (*BackendHandle) Name ¶
func (bh *BackendHandle) Name() string
func (*BackendHandle) Tools ¶
func (bh *BackendHandle) Tools() ([]protocol.ToolDefinition, error)
type BackendMetadata ¶
type DiscoveredManifest ¶
type DiscoveredManifest struct {
Source string `json:"source"`
ServerCmd string `json:"serverCmd"`
ServerArgs []string `json:"serverArgs"`
}
func DiscoverFromConfig ¶
func DiscoverFromConfig(_ string) (*DiscoveredManifest, error)
func ParseManifest ¶
func ParseManifest(data []byte) (*DiscoveredManifest, error)
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func NewHealthChecker(interval, timeout time.Duration, maxFailures int) *HealthChecker
func (*HealthChecker) HealthyBackends ¶
func (hc *HealthChecker) HealthyBackends(backends []*BackendHandle) []*BackendHandle
func (*HealthChecker) Reset ¶
func (hc *HealthChecker) Reset(name string)
func (*HealthChecker) Start ¶
func (hc *HealthChecker) Start(ctx context.Context, backends []*BackendHandle)
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) AddBackend ¶
func (*Registry) AggregatedTools ¶
func (r *Registry) AggregatedTools() []protocol.ToolDefinition
func (*Registry) All ¶
func (r *Registry) All() []*BackendHandle
func (*Registry) BackendCount ¶
func (*Registry) Get ¶
func (r *Registry) Get(name string) *BackendHandle
func (*Registry) HealthCheckAll ¶
func (r *Registry) HealthCheckAll()
func (*Registry) HealthCheckAndRestart ¶
func (r *Registry) HealthCheckAndRestart()
func (*Registry) Metadata ¶
func (r *Registry) Metadata() []BackendMetadata
func (*Registry) SetBaseContext ¶
Click to show internal directories.
Click to hide internal directories.