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
open class DeploymentEnvironment<T : Any>( | |
val base: T, | |
vararg val profiles: Pair<String, (T) -> T> | |
) { | |
companion object { | |
fun <T : Any> config(clazz: Class<T>, name: String, profiles: Iterable<String> = emptyList()): T { | |
return (Class.forName(clazz.`package`.name + "." + name).kotlin.objectInstance as DeploymentEnvironment<T>) | |
.config(profiles) | |
} |
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
interface I18n { | |
fun localized(languageTag: String): Localized | |
interface Localized { | |
fun text(key: String, args: Map<String, Any>): String | |
fun text(key: String): String = text(key, emptyMap()) | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="generator" content="pandoc"> | |
<title></title> | |
<style type="text/css">code{white-space: pre;}</style> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"os/exec" | |
"time" | |
"github.com/fsnotify/fsnotify" |
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 io.github.resilience4j.bulkhead.Bulkhead | |
import okhttp3.Interceptor | |
import okhttp3.Response | |
class BulkheadInterceptor(private val bulkhead: Bulkhead) : Interceptor { | |
override fun intercept(chain: Interceptor.Chain): Response = | |
bulkhead.executeCallable { chain.proceed(chain.request()) } | |
} |
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 org.springframework.restdocs.headers.HeaderDescriptor | |
import org.springframework.restdocs.headers.HeaderDocumentation | |
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation | |
import org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse | |
import org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint | |
import org.springframework.restdocs.payload.FieldDescriptor | |
import org.springframework.restdocs.payload.PayloadDocumentation | |
import org.springframework.restdocs.payload.SubsectionDescriptor | |
import org.springframework.restdocs.request.ParameterDescriptor | |
import org.springframework.restdocs.request.RequestDocumentation |
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 com.google.gson.Gson | |
import com.google.gson.GsonBuilder | |
import io.jaegertracing.zipkin.internal.V2SpanConverter | |
import java.lang.reflect.Field | |
import java.lang.reflect.Modifier | |
import java.lang.invoke.MethodHandles | |
import java.lang.invoke.VarHandle | |
class FixZipkinV2Reporter(gson: Gson = PRIVACY_RESPECTING_GSON) { | |
init { |
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 io.github.resilience4j.bulkhead.Bulkhead | |
import io.github.resilience4j.bulkhead.utils.BulkheadUtils | |
import io.grpc.CallOptions | |
import io.grpc.Channel | |
import io.grpc.ClientCall | |
import io.grpc.ClientInterceptor | |
import io.grpc.ClientInterceptors | |
import io.grpc.ForwardingClientCallListener | |
import io.grpc.Metadata | |
import io.grpc.MethodDescriptor |
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 com.athaydes.rawhttp.core.EagerBodyReader; | |
import com.athaydes.rawhttp.core.EagerHttpResponse; | |
import com.athaydes.rawhttp.core.MethodLine; | |
import com.athaydes.rawhttp.core.RawHttp; | |
import com.athaydes.rawhttp.core.RawHttpHeaders; | |
import com.athaydes.rawhttp.core.RawHttpRequest; | |
import org.apache.thrift.transport.TTransport; | |
import org.apache.thrift.transport.TTransportException; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
interface CircuitBreakerMetrics { | |
fun executionCompleted(name: String, latency: Double) = Unit | |
} |
NewerOlder