agones

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSDKClient

func NewSDKClient(addr string) (sdk.SDKClient, error)

NewSDKClient returns a new Agones SDK client.

Types

type Client

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

Client is the Agones client.

func NewClient

func NewClient(sdkClient sdk.SDKClient) *Client

NewClient returns a new agones client.

func (*Client) Close

func (a *Client) Close()

Close closes active connections.

func (*Client) Run

func (a *Client) Run(ctx context.Context)

Run runs the state watcher and manages the distribution of the updates.

func (*Client) UpdateState

func (a *Client) UpdateState(ctx context.Context, st State) error

UpdateState updates the state.

func (*Client) WatchStateChanged

func (a *Client) WatchStateChanged(ctx context.Context) <-chan State

WatchStateChanged returns a channel to watch for state changes.

type State

type State string

State represents an Agones state.

const (
	// StateReady is the Agones state Ready.
	// The state indicates that the game server is ready to receive traffic.
	StateReady State = "Ready"

	// StateAllocated is the Agones state Allocated.
	// The state indicates that the game server hosts a game session.
	StateAllocated State = "Allocated"

	// StateShutdown is the Agones state Shutdown.
	// The state indicates that the game server is shutting down.
	StateShutdown State = "Shutdown"
)

Jump to

Keyboard shortcuts

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