GrpcBeta

class GrpcBeta(channel: Channel) : AgonesSdk.Beta(source)

The GrpcBeta class provides gRPC-based implementations for all interfaces of the Beta-Channel of the Agones SDK. The implementation encapsulates the communication the external interface of the SDK and manages the corresponding stubs. This sub SDK operates on the same channel as the primary SDK and therefore shares its connections and related resources as well as its state.

The creation of this object only creates the necessary stub and does not initiate any communication to the external SDK interface. It merely equips the SDK with means to communicate with the SDK, if requested by invoking any of the provided Beta interfaces.

Parameters

channel

The channel of the primary Agones SDK that is used for the communication with the external network interface and that holds the related connections and resources.

Constructors

Link copied to clipboard
constructor(channel: Channel)

Functions

Link copied to clipboard
open suspend override fun addListValue(name: String, value: String)

Adds the supplied value to the list with the supplied name. If no list with this name exists, the entry already exists in the list, or this operation would grow the corresponding list above the current capacity, an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun counterCapacity(name: String): Long

Retrieves the current capacity of the counter with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no counter with this name exists, an appropriate exception will be thrown.

open suspend override fun counterCapacity(name: String, capacity: Long)

Sets a new capacity for the counter with the supplied name. If no counter with this name exists or the capacity is not in the interval [0, Long.MAX_VALUE], an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun counterCount(name: String): Long

Retrieves the current count of the counter with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no counter with this name exists, an appropriate exception will be thrown.

open suspend override fun counterCount(name: String, value: Long)

Sets a new count for the counter with the supplied name. If no counter with this name exists or the value is not in the interval [0, capacity], an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun decrementCounter(name: String)

Decreases the current count for the counter with the supplied name. If no counter with this name exists or this operation would decrease the corresponding counter below 0 (would get negative), an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun incrementCounter(name: String)

Increases the current count for the counter with the supplied name. If no counter with this name exists or this operation would increase the corresponding counter above the current capacity, an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun listCapacity(name: String): Long

Retrieves the current capacity of the list with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no list with this name exists, an appropriate exception will be thrown.

open suspend override fun listCapacity(name: String, capacity: Long)

Sets a new capacity for the list with the supplied name. If no list with this name exists or the capacity is not in the interval [0, 1000], an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun listContains(name: String, value: String): Boolean

Checks whether the specified value is within the list with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no list with this name exists, an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun listSize(name: String): Int

Retrieves the current size of the list with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no list with this name exists, an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun listValues(name: String): List<String>

Retrieves the current entries of the list with the supplied name. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource. If no list with this name exists, an appropriate exception will be thrown.

Link copied to clipboard
open suspend override fun removeListValue(name: String, value: String)

Removes the supplied value from the list with the supplied name. If no list with this name exists or the specified entry does not exist, an appropriate exception will be thrown.