This file contains hidden or 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
| use hello_world::greeter_server::{Greeter, GreeterServer}; | |
| use hello_world::{HelloReply, HelloRequest}; | |
| use tonic::{transport::Server, Request, Response, Status}; | |
| pub mod hello_world { | |
| tonic::include_proto!("helloworld"); | |
| } | |
| #[derive(Default)] | |
| pub struct MyGreeter {} |
This file contains hidden or 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
| #[derive(Clone)] | |
| struct TraceWrapper<T> { | |
| inner: Trace<T, SharedClassifier<GrpcErrorsAsFailures>>, | |
| } | |
| impl<T> TraceWrapper<T> { | |
| fn new(inner: T) -> Self { | |
| let wrapped = ServiceBuilder::new() | |
| .layer(TraceLayer::new_for_grpc()) | |
| .service(inner); |
This file contains hidden or 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
| use std::io; | |
| use opentelemetry::sdk::{trace, trace::Sampler}; | |
| use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; | |
| #[tokio::main] | |
| async fn main() -> anyhow::Result<()> { | |
| let tracer = opentelemetry_jaeger::new_pipeline() | |
| .with_collector_endpoint("http://localhost:14268/api/traces") | |
| .with_trace_config(trace::config().with_sampler(Sampler::AlwaysOn)) | |
| .install_simple()?; |
This file contains hidden or 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
| syntax = "proto2"; | |
| package ext; | |
| import "google/protobuf/descriptor.proto"; | |
| extend google.protobuf.FieldOptions { | |
| optional bool required = 30004; | |
| } |
This file contains hidden or 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 WebsocketSubject[I: Encoder, O: Decoder](url: String, os: OverflowStrategy.Synchronous[O])( | |
| implicit scheduler: Scheduler | |
| ) extends Subject[I, O] { | |
| self => | |
| import NettyFutureConverters._ | |
| private val socket = { | |
| val httpClient = org.asynchttpclient.Dsl.asyncHttpClient() | |
| Task |
This file contains hidden or 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 Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
This file contains hidden or 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
| ## SAVING | |
| if [[ $BUILDKITE_BRANCH == "master" ]]; then | |
| echo "+++ :docker: Saving image $COMPOSE_SERVICE_DOCKER_IMAGE_NAME" | |
| local name="${BUILDKITE_PIPELINE_SLUG}_${BUILDKITE_BRANCH}_${COMPOSE_SERVICE_NAME}" | |
| local slug=/tmp/docker-cache/$name.tar.gz | |
| local BUILDKITE_IMAGE_CACHE_BUCKET="xxx-docker-cache" | |
| local images_file=s3://$BUILDKITE_IMAGE_CACHE_BUCKET/$name.images | |
| local images=$(echo $(docker images -a | grep $(echo $BUILDKITE_JOB_ID | sed 's/-//g') | awk '{print $1}' | xargs -n 1 docker history -q | grep -v '<missing>')) |
This file contains hidden or 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
| 92274 | |
| 92276 | |
| 92277 | |
| 92278 | |
| 95191 | |
| 90847 | |
| 90848 | |
| 90848 | |
| 93526 | |
| 95220 |
This file contains hidden or 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
| scala> :paste | |
| // Entering paste mode (ctrl-D to finish) | |
| import scala.reflect.runtime.universe._ | |
| import annotation.implicitNotFound | |
| import concurrent.Future | |
| import concurrent.ExecutionContext.Implicits.global | |
| sealed trait Existence | |
| trait Exists extends Existence |
This file contains hidden or 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
| npm info PACKAGE_NAME --json | jq '.dist.tarball' -r | xargs curl --silent | tar -tvf - |
NewerOlder