pub struct GameServerPort {
pub name: String,
pub port_policy: PortPolicy,
pub container: Option<String>,
pub container_port: Option<u16>,
pub host_port: Option<u16>,
pub protocol: Protocol,
}
Expand description
Defines a set of Ports that are to be exposed via the GameServer
.
Fields§
§name: String
Name is the descriptive name of the port
port_policy: PortPolicy
PortPolicy defines the policy for how the HostPort is populated.
Dynamic port will allocate a HostPort within the selected MIN_PORT and MAX_PORT range passed to the controller
at installation time.
When Static
portPolicy is specified, HostPort
is required, to specify the port that game clients will
connect to
container: Option<String>
The name of the container on which to open the port. Defaults to the game server container.
container_port: Option<u16>
The port that is being opened on the specified container’s process
host_port: Option<u16>
The port exposed on the host for clients to connect to
protocol: Protocol
Protocol is the network protocol being used. Defaults to UDP. TCP and TCPUDP are other options.
Trait Implementations§
source§impl Clone for GameServerPort
impl Clone for GameServerPort
source§fn clone(&self) -> GameServerPort
fn clone(&self) -> GameServerPort
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GameServerPort
impl Debug for GameServerPort
source§impl<'de> Deserialize<'de> for GameServerPort
impl<'de> Deserialize<'de> for GameServerPort
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for GameServerPort
impl JsonSchema for GameServerPort
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreAuto Trait Implementations§
impl RefUnwindSafe for GameServerPort
impl Send for GameServerPort
impl Sync for GameServerPort
impl Unpin for GameServerPort
impl UnwindSafe for GameServerPort
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request