Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocation ¶
Allocation is a game server allocation
type Client ¶
type Client struct { // CA is a list of CAs to consider valid for the respsonse CA []byte // ClientCert is the client certificate to use for gRPC communication ClientCert []byte // ClientKey is the key corresponding to ClientCert ClientKey []byte // Endpoints is a map of possible allocators and their corresponding pingServers // if there is no ping server for that allocator, then the value is an empty string Endpoints map[string]string // Namespace is the namespace of the fleet or set of gameservers we wish to allocate from Namespace string // Multicluster is a boolean indicating if a multi-cluster request should be made Multicluster bool // Endpoint is the chose endpoint after checkPing is resolved Endpoint string // DialOpts is a constructed grpc DialOption that is used to make requests DialOpts grpc.DialOption // MatchLabels is a map of key/value pairs to send when asking for an allocation MatchLabels map[string]string // MaxRetries is the maximum number of times to retry allocations MaxRetries int // MetaPatch is metadata to set on the gameserver MetaPatch *pb.MetaPatch }
Client is all of the things necessary to build an allocator request
func NewClient ¶
func NewClient(keyFile, certFile, cacertFile, namespace string, multiCluster bool, labelSelector map[string]string, hosts []string, pingHosts map[string]string, maxRetries int) (*Client, error)
NewClient builds a new client object
func (*Client) AllocateGameserverWithRetry ¶ added in v0.1.0
func (c *Client) AllocateGameserverWithRetry() (*Allocation, error)
AllocateGameserverWithRetry will retry multiple times
Click to show internal directories.
Click to hide internal directories.