Documentation
¶
Index ¶
- type Manager
- func (m *Manager) AddRoot(root models.Root) error
- func (m *Manager) GetCompletions(uri string, argName, prefix string) ([]string, bool, *int, error)
- func (m *Manager) ListResources(ctx context.Context, cursor *models.Cursor) ([]models.Resource, *models.Cursor, error)
- func (m *Manager) ReadResource(ctx context.Context, uri string) ([]models.ResourceContent, error)
- func (m *Manager) Shutdown(ctx context.Context) error
- func (m *Manager) Subscribe(uri string) (*Subscription, error)
- func (m *Manager) UpdateResource(uri string, content string) error
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles resource operations and maintains resource state.
func (*Manager) GetCompletions ¶
GetCompletions returns completion options for a resource argument. It analyzes the resource contents and returns possible completions that match the provided prefix.
func (*Manager) ListResources ¶
func (m *Manager) ListResources(ctx context.Context, cursor *models.Cursor) ([]models.Resource, *models.Cursor, error)
ListResources returns a list of available resources.
func (*Manager) ReadResource ¶
ReadResource reads the contents of a specific resource.
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription represents an active subscription to resource updates.
func (*Subscription) Channel ¶
func (s *Subscription) Channel() <-chan *models.ResourceUpdatedNotification
Channel returns the notification channel for this subscription.
func (*Subscription) Close ¶
func (s *Subscription) Close()
Close closes the subscription and removes it from the manager.
Click to show internal directories.
Click to hide internal directories.