Documentation
¶
Overview ¶
Package groups provides functionality for managing logical groupings of MCP servers. It includes types and interfaces for creating, retrieving, listing, and deleting groups.
Index ¶
Constants ¶
View Source
const DefaultGroup = "default"
DefaultGroup is the name of the default group for workloads
View Source
const (
// DefaultGroupName is the name of the default group
DefaultGroupName = "default"
)
Variables ¶
This section is empty.
Functions ¶
func CheckAndPerformDefaultGroupMigration ¶ added in v0.2.1
func CheckAndPerformDefaultGroupMigration()
CheckAndPerformDefaultGroupMigration checks if default group migration is needed and performs it This is called once at application startup
Types ¶
type Group ¶
type Group struct {
Name string `json:"name"`
}
Group represents a logical grouping of MCP servers.
type Manager ¶
type Manager interface {
// Create creates a new group with the specified name.
// Returns an error if a group with the same name already exists.
Create(ctx context.Context, name string) error
// Get retrieves a group by name.
// Returns an error if the group does not exist.
Get(ctx context.Context, name string) (*Group, error)
// List returns all groups.
List(ctx context.Context) ([]*Group, error)
// Delete removes a group by name.
// Returns an error if the group does not exist.
Delete(ctx context.Context, name string) error
// Exists checks if a group with the specified name exists.
Exists(ctx context.Context, name string) (bool, error)
// GetWorkloadGroup returns the group that a workload belongs to, if any.
// Returns nil if the workload is not in any group.
GetWorkloadGroup(ctx context.Context, workloadName string) (*Group, error)
// ListWorkloadsInGroup returns all workload names that belong to the specified group.
ListWorkloadsInGroup(ctx context.Context, groupName string) ([]string, error)
}
Manager defines the interface for managing groups of MCP servers. It provides methods for creating, retrieving, listing, and deleting groups.
Click to show internal directories.
Click to hide internal directories.