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
template: Hello, %s! | |
defaultName: Stranger | |
server: | |
maxThreads: 200 | |
minThreads: 200 | |
maxQueuedRequests: 9999 | |
requestLog: | |
appenders: [] | |
httpClient: | |
maxConnectionsPerRoute: 9999 |
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 ch.qos.logback.classic.LoggerContext; | |
import ch.qos.logback.classic.spi.ILoggingEvent; | |
import ch.qos.logback.contrib.jackson.JacksonJsonFormatter; | |
import ch.qos.logback.core.Appender; | |
import ch.qos.logback.core.FileAppender; | |
import ch.qos.logback.core.Layout; | |
import ch.qos.logback.core.encoder.LayoutWrappingEncoder; | |
import com.cofi.api.disbursement.util.logging.JsonStacktraceLayout; |
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 | |
var TLS = true | |
var port = 443 | |
var certificateFile = "./server_localhost.pem" | |
var keyFile = "./server_localhost.pkcs8key" | |
func main() { | |
SetupMuxedServer().Serve() | |
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
gwmux := runtime.NewServeMux(runtime.WithForwardResponseOption(forwardResponseOption)) | |
func forwardResponseOption(ctx context.Context, w http.ResponseWriter, p proto.Message) error { | |
for k, v := range w.Header() { | |
log.Printf("%s=%s\n", k, v) | |
} | |
md, ok := runtime.ServerMetadataFromContext(ctx) | |
if !ok { |
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 ( | |
"context" | |
"fmt" | |
"log" | |
"github.com/jamisonhyatt/grpc-multi-pkg-protos/pkg/external/location" | |
"github.com/jamisonhyatt/grpc-multi-pkg-protos/pkg/weatherman" | |
desktop "github.com/jamisonhyatt/grpc-multi-pkg-protos/pkg/weatherman/desktop_svc" |
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
//The below code is untested - it was modified from working, but non-public code. | |
// testServer represents an actual running grpc server | |
type testServer struct { | |
address string | |
listener net.Listener | |
server *grpc.Server | |
} |
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 ( | |
"context" | |
"fmt" | |
"github.com/Azure/azure-sdk-for-go/profiles/latest/hdinsight/mgmt/hdinsight" | |
"github.com/Azure/go-autorest/autorest/azure/auth" | |
"log" | |
"strings" | |
) |