Documentation
¶
Index ¶
- func Alias(packageName, server, tool string) string
- func Open(ctx context.Context, launch Launch, ...) (*sdk.ClientSession, error)
- func ServerOptions(server protocol.PluginMcpServer) protocol.PluginMcpOptions
- type AuthorityKey
- type Change
- type Configuration
- type Elicit
- type Launch
- type Lease
- type Options
- type Pool
- func (pool *Pool) Acquire(ctx context.Context, config Configuration) (result *Lease, resultErr error)
- func (pool *Pool) Changed() <-chan struct{}
- func (pool *Pool) Changes() []string
- func (pool *Pool) Close() error
- func (pool *Pool) Expire() error
- func (pool *Pool) FinishInventory(user string)
- func (pool *Pool) Invalidate(packageName, user string) error
- func (pool *Pool) Observe(summary protocol.PluginSummary, user string) error
- func (pool *Pool) ScopedChanges() []Change
- func (pool *Pool) Status(reference protocol.PluginReference, server, user string) *protocol.PluginMcpRuntime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
func Open(ctx context.Context, launch Launch, elicit func(context.Context, *sdk.ElicitRequest) (*sdk.ElicitResult, error)) (*sdk.ClientSession, error)
func ServerOptions ¶
func ServerOptions(server protocol.PluginMcpServer) protocol.PluginMcpOptions
Types ¶
type AuthorityKey ¶
type AuthorityKey struct {
// contains filtered or unexported fields
}
AuthorityKey identifies the destination and authorization without retaining the lease or exposing its credentials.
type Change ¶
type Change struct{ User, Package string }
Change identifies one user installation whose runtime changed.
type Configuration ¶
type Elicit ¶
type Elicit func(context.Context, *sdk.ElicitRequest) (*sdk.ElicitResult, error)
type Lease ¶
type Lease struct {
// contains filtered or unexported fields
}
func (*Lease) AuthorityKey ¶
func (lease *Lease) AuthorityKey() AuthorityKey
type Options ¶
type Options struct {
Clock clockwork.Clock
// Warm asks the pool's owner to connect the reusable servers of the
// current packages ahead of their first use.
Warm bool
Open func(context.Context, Launch, func(context.Context, *sdk.ElicitRequest) (*sdk.ElicitResult, error)) (*sdk.ClientSession, error)
}
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Changed ¶
func (pool *Pool) Changed() <-chan struct{}
Changed wakes when a server's runtime differs from the one last reported.
func (*Pool) FinishInventory ¶
func (*Pool) Invalidate ¶
func (*Pool) ScopedChanges ¶
ScopedChanges drains runtime changes with their owning user.
func (*Pool) Status ¶
func (pool *Pool) Status(reference protocol.PluginReference, server, user string) *protocol.PluginMcpRuntime