Documentation
¶
Index ¶
- Constants
- func NewTextResult(content string, err error) *mcp.CallToolResult
- func ServerToolToM3LabsServerTool(s *Server, tools []api.ServerTool) ([]server.ServerTool, error)
- type Configuration
- type ContextKey
- type Server
- func (s *Server) Close()
- func (s *Server) GetEnabledTools() []string
- func (s *Server) GetKubernetesAPIServerHost() string
- func (s *Server) KubernetesApiVerifyToken(ctx context.Context, token string, audience string) (*authenticationapiv1.UserInfo, []string, error)
- func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer
- func (s *Server) ServeSse(baseUrl string, httpServer *http.Server) *server.SSEServer
- func (s *Server) ServeStdio() error
Constants ¶
View Source
const TokenScopesContextKey = ContextKey("TokenScopesContextKey")
Variables ¶
This section is empty.
Functions ¶
func NewTextResult ¶
func NewTextResult(content string, err error) *mcp.CallToolResult
func ServerToolToM3LabsServerTool ¶ added in v0.0.52
func ServerToolToM3LabsServerTool(s *Server, tools []api.ServerTool) ([]server.ServerTool, error)
Types ¶
type Configuration ¶
type Configuration struct { *config.StaticConfig // contains filtered or unexported fields }
func (*Configuration) ListOutput ¶
func (c *Configuration) ListOutput() output.Output
func (*Configuration) Toolsets ¶ added in v0.0.52
func (c *Configuration) Toolsets() []api.Toolset
type ContextKey ¶ added in v0.0.48
type ContextKey string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(configuration Configuration) (*Server, error)
func (*Server) GetEnabledTools ¶
func (*Server) GetKubernetesAPIServerHost ¶
GetKubernetesAPIServerHost returns the Kubernetes API server host from the configuration.
func (*Server) KubernetesApiVerifyToken ¶ added in v0.0.49
func (s *Server) KubernetesApiVerifyToken(ctx context.Context, token string, audience string) (*authenticationapiv1.UserInfo, []string, error)
KubernetesApiVerifyToken verifies the given token with the audience by sending an TokenReview request to API Server.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer
func (*Server) ServeStdio ¶
Click to show internal directories.
Click to hide internal directories.