istio: Index | Files | Directories

package mcptest

import ""


Package Files


type Server Uses

type Server struct {
    // The internal snapshot.Cache that the server is using.
    Cache *snapshot.Cache

    // Collections that were originally passed in.
    Collections []source.CollectionOptions

    // Port that the service is listening on.
    Port int

    // The gRPC compatible address of the service.
    URL *url.URL
    // contains filtered or unexported fields

Server is a simple MCP server, used for testing purposes.

func NewServer Uses

func NewServer(port int, collections []source.CollectionOptions) (*Server, error)

NewServer creates and starts a new MCP Server. Returns a new Server instance upon success. Specifying port as 0 will cause the server to bind to an arbitrary port. This port can be queried from the Port field of the returned server struct.

func (*Server) Close Uses

func (t *Server) Close() (err error)

Close implement io.Closer.Close



Package mcptest imports 13 packages (graph). Updated 2019-04-22. Refresh now. Tools for package owners.