This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calculateSubscriberVideoPanelElement(stream: any, isMemberStream: boolean) { | |
const { callModel, cameraModel, medium, isSupervisor } = this.props; | |
if (isNil(stream)) { | |
if (isMemberStream) { | |
if (callModel && callModel.sirenEndTime) { | |
return <SirenCounter callModel={callModel} withTokboxWrapper={true} />; | |
} else { | |
return <NoVideo medium={medium} cameraModel={cameraModel} />; | |
} | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.vertx.core.Vertx | |
import io.vertx.ext.web.Router | |
import java.time.Instant.now | |
import kotlin.math.pow | |
fun main() { | |
println("starting application ${now().epochSecond}") | |
val now = now() | |
val cores = Runtime.getRuntime().availableProcessors() | |
val ram = Runtime.getRuntime().maxMemory().toDouble() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#deployment.yaml | |
resources: | |
limits: | |
memory: "256Mi" | |
cpu: "500" | |
requests: | |
memory: "256Mi" | |
cpu: "150m" | |
... | |
livenessProbe: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get --raw /apis/metrics.k8s.io/v1beta1/namespaces/${NAMESPACE_NAME}/pods/${POD_NAME} | jq . | |
{ | |
"kind": "PodMetrics", | |
"apiVersion": "metrics.k8s.io/v1beta1", | |
"metadata": { | |
"name": "PODNAME", | |
"namespace": "NAMESPACE", | |
"selfLink": "/apis/metrics.k8s.io/v1beta1/namespaces/NAMESPACE/pods/PODNAME", | |
"creationTimestamp": "2020-04-15T10:53:04Z" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pod schedualed event timestamp | |
kubectl get pod $pod -o json | jq -r '.status.conditions[] | select(.type=="PodScheduled") | .lastTransitionTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BananaApi { | |
fun getBanana(id: String): Banana { | |
return Banana(Color.GREEN, 0.5, id) | |
} | |
fun deleteBanana(id: String) { | |
println("delete banana with id $id") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service Banana { | |
rpc GetBanana (GetBananaRequest) returns (BananaResponse) {} | |
rpc CreateBanana (CreateBananaRequest) returns (BananaResponse) {} | |
} | |
message GetBananaRequest { | |
string id = 1; | |
} | |
message BananaResponse { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "google/api/annotations.proto"; | |
service Banana { | |
rpc CreateBanana (CreateBananaRequest) returns (BananaResponse) { | |
option (google.api.http) = { | |
post: "/v1/example/echo" | |
body: "*" | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.swagger.v3.oas.annotations.OpenAPIDefinition | |
import io.swagger.v3.oas.annotations.Operation | |
import io.swagger.v3.oas.annotations.Parameter | |
import io.swagger.v3.oas.annotations.enums.ParameterIn | |
import io.swagger.v3.oas.annotations.info.Info | |
import io.swagger.v3.oas.annotations.media.Content | |
import io.swagger.v3.oas.annotations.media.Schema | |
import io.swagger.v3.oas.annotations.parameters.RequestBody | |
import io.swagger.v3.oas.annotations.responses.ApiResponse | |
import javax.ws.rs.GET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build.gradle | |
resolve { | |
outputFileName = 'swagger' | |
outputFormat = 'JSON' // or YAML | |
prettyPrint = 'TRUE' | |
classpath = sourceSets.main.runtimeClasspath | |
resourcePackages = ['com.banana'] // packages with service definitions | |
outputDir = file('open-api') | |
readAllResources = true | |
} |
OlderNewer