public

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for public API

func (*Client) ListServer

ListServer gets list of qo s services

```

This endpoint lists all QoS services available in all regions.

This endpoint is intended to be called by game client to find out all available regions. After getting a list of QoS on each region, game client is expected to ping each one with UDP connection as described below:

1. Make UDP connection to each QoS's IP:Port 2. Send string "PING" after connection established 3. Wait for string "PONG" response 4. Note the request-response latency for each QoS in each region

The game then can use ping latency information to either:

  1. Inform the player on these latencies and let player choose preferred region
  2. Send the latency list to Matchmaking Service so that player can be matched with other players in nearby regions

```

func (*Client) ListServerShort added in v0.8.0

func (a *Client) ListServerShort(params *ListServerParams, authInfo runtime.ClientAuthInfoWriter) (*ListServerOK, error)

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	ListServer(params *ListServerParams, authInfo runtime.ClientAuthInfoWriter) (*ListServerOK, *ListServerInternalServerError, error)
	ListServerShort(params *ListServerParams, authInfo runtime.ClientAuthInfoWriter) (*ListServerOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new public API client.

type ListServerInternalServerError

type ListServerInternalServerError struct {
	Payload *qosmclientmodels.ResponseError
}

ListServerInternalServerError handles this case with default header values.

Internal Server Error

func NewListServerInternalServerError

func NewListServerInternalServerError() *ListServerInternalServerError

NewListServerInternalServerError creates a ListServerInternalServerError with default headers values

func (*ListServerInternalServerError) Error

func (*ListServerInternalServerError) GetPayload

type ListServerOK

type ListServerOK struct {
	Payload *qosmclientmodels.ModelsListServerResponse
}

ListServerOK handles this case with default header values.

list of QoS services returned

func NewListServerOK

func NewListServerOK() *ListServerOK

NewListServerOK creates a ListServerOK with default headers values

func (*ListServerOK) Error

func (o *ListServerOK) Error() string

func (*ListServerOK) GetPayload

type ListServerParams

type ListServerParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ListServerParams contains all the parameters to send to the API endpoint for the list server operation typically these are written to a http.Request

func NewListServerParams

func NewListServerParams() *ListServerParams

NewListServerParams creates a new ListServerParams object with the default values initialized.

func NewListServerParamsWithContext

func NewListServerParamsWithContext(ctx context.Context) *ListServerParams

NewListServerParamsWithContext creates a new ListServerParams object with the default values initialized, and the ability to set a context for a request

func NewListServerParamsWithHTTPClient

func NewListServerParamsWithHTTPClient(client *http.Client) *ListServerParams

NewListServerParamsWithHTTPClient creates a new ListServerParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewListServerParamsWithTimeout

func NewListServerParamsWithTimeout(timeout time.Duration) *ListServerParams

NewListServerParamsWithTimeout creates a new ListServerParams object with the default values initialized, and the ability to set a timeout on a request

func (*ListServerParams) SetContext

func (o *ListServerParams) SetContext(ctx context.Context)

SetContext adds the context to the list server params

func (*ListServerParams) SetHTTPClient

func (o *ListServerParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the list server params

func (*ListServerParams) SetTimeout

func (o *ListServerParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the list server params

func (*ListServerParams) WithContext

func (o *ListServerParams) WithContext(ctx context.Context) *ListServerParams

WithContext adds the context to the list server params

func (*ListServerParams) WithHTTPClient

func (o *ListServerParams) WithHTTPClient(client *http.Client) *ListServerParams

WithHTTPClient adds the HTTPClient to the list server params

func (*ListServerParams) WithTimeout

func (o *ListServerParams) WithTimeout(timeout time.Duration) *ListServerParams

WithTimeout adds the timeout to the list server params

func (*ListServerParams) WriteToRequest

func (o *ListServerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ListServerReader

type ListServerReader struct {
	// contains filtered or unexported fields
}

ListServerReader is a Reader for the ListServer structure.

func (*ListServerReader) ReadResponse

func (o *ListServerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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