Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeIceServer ¶
type FakeIceServer struct {
// contains filtered or unexported fields
}
FakeIceServer is a test server that replicates an iCE registry server interface.
func NewFakeIceServer ¶
func NewFakeIceServer() *FakeIceServer
NewFakeIceServer is a constructor that provides a reference to a FakeIceServer instance.
func (*FakeIceServer) Endpoint ¶
func (s *FakeIceServer) Endpoint() string
Endpoint returns the URL of the test server. The test server picks a random port every time it starts.
func (*FakeIceServer) Handle ¶
func (s *FakeIceServer) Handle(method, path string, handlerFunc HandlerFunc)
Handle registers a HandleFunc for requests directed to the provided path and HTTP verb.
func (*FakeIceServer) ServeHTTP ¶
func (s *FakeIceServer) ServeHTTP(resp http.ResponseWriter, req *http.Request)
func (*FakeIceServer) Stop ¶
func (s *FakeIceServer) Stop()
Stop kills the connections to the test server and stops the server.
type HandlerFunc ¶
type HandlerFunc func(resp http.ResponseWriter, req *http.Request)
HandlerFunc is the signature of any function used to handle HTTP requests in the test server.
Click to show internal directories.
Click to hide internal directories.