示例#1
0
 static Option <V1ServicePort> ExtractExposedPort(string exposedPort) =>
 PortAndProtocol.Parse(exposedPort)
 .Map(portAndProtocol => new V1ServicePort(portAndProtocol.Port, name: $"ExposedPort-{portAndProtocol.Port}-{portAndProtocol.Protocol}".ToLowerInvariant(), protocol: portAndProtocol.Protocol));
示例#2
0
 static IEnumerable <V1ServicePort> ExtractHostPorts(string name, IEnumerable <PortBinding> bindings)
 =>
 PortAndProtocol.Parse(name)
 .Map(
示例#3
0
 static Option <V1ContainerPort> ExtractContainerPort(string exposedPort)
 => PortAndProtocol.Parse(exposedPort)
 .Map(portAndProtocol => new V1ContainerPort(portAndProtocol.Port, protocol: portAndProtocol.Protocol));