allocator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

type Allocation struct {
	Address string
	Port    int32
}

Allocation is a game server allocation

type Client

type Client struct {
	CA           []byte
	ClientCert   []byte
	ClientKey    []byte
	Endpoint     string
	Namespace    string
	Multicluster bool
	DialOpts     grpc.DialOption
	MatchLabels  map[string]string
}

Client is all of the things necessary to build an allocator request

func NewClient

func NewClient(keyFile, certFile, cacertFile, externalIP, namespace string, multiCluster bool, labelSelector map[string]string) (*Client, error)

NewClient builds a new client object

func (*Client) AllocateGameserver

func (c *Client) AllocateGameserver() (*Allocation, error)

AllocateGameserver allocates a new gamserver

func (*Client) RunUDPLoad

func (c *Client) RunUDPLoad(count int, delay int, duration int) error

RunUDPLoad runs many concurrent game connections on a simple UDP server This is designed to test the allocator service and autoscaling of the game servers.

Jump to

Keyboard shortcuts

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