Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLocalProxy ¶
type MockLocalProxy struct {
// Server handles arbitrary HTTP requests.
Server *httptest.Server
// Node is a centrifuge broker node handled via websockets.
Node *centrifuge.Node
// Host is the hostname of the proxy, including protocol.
Host string
// JWT is the mock token this instance of the mock uses.
JWT string
// ReserveResponse is the reservation request response this mock uses.
ReserveResponse *model.ReserveResponse
// HoldStatus is the status of a server hold, the response this mock uses.
HoldStatus *model.HoldStatus
// PatchAllocationRequests is a map of the last requests made to patch each
// allocation. This is used to verify the request body.
PatchAllocationRequests map[string]*model.PatchAllocationRequest
}
MockLocalProxy represents a mock implementation of the Game Server Hosting machine-local proxy.
func NewLocalProxy ¶
func NewLocalProxy() (*MockLocalProxy, error)
NewLocalProxy sets up a new websocket server with centrifuge which accepts all connections and subscriptions. It also handles the JWT token endpoint.
func (*MockLocalProxy) Close ¶
func (s *MockLocalProxy) Close()
Close closes the testing SDK server.
Click to show internal directories.
Click to hide internal directories.