mcptest

package
v0.0.0-...-fe632b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

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

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

Close implement io.Closer.Close

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL