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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "centos/7" | |
config.vm.provider "virtualbox" do |vb| | |
# Customize the amount of memory on the VM: |
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
find ~/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid |
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
package com.rurocker.algo.ds; | |
/** | |
* DoublyLinkedList implementation | |
* Created by ricky on 5/29/17. | |
*/ | |
public class DoublyLinkedList<E> { | |
private int size; | |
private Node<E> head; |
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
package lorem_consul | |
import ( | |
consulsd "github.com/go-kit/kit/sd/consul" | |
"github.com/go-kit/kit/log" | |
"os" | |
"github.com/hashicorp/consul/api" | |
"github.com/go-kit/kit/sd" | |
"math/rand" | |
"strconv" |
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
package lorem_metrics | |
import ( | |
"github.com/go-kit/kit/metrics" | |
"time" | |
) | |
func Metrics(requestCount metrics.Counter, | |
requestLatency metrics.Histogram) ServiceMiddleware { | |
return func(next Service) Service { |
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
package main | |
import ( | |
"flag" | |
"time" | |
"log" | |
grpcClient "github.com/ru-rocker/gokit-playground/lorem-grpc/client" | |
"google.golang.org/grpc" | |
"golang.org/x/net/context" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc" |
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
package client | |
import ( | |
"github.com/ru-rocker/gokit-playground/lorem-grpc" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc/pb" | |
grpctransport "github.com/go-kit/kit/transport/grpc" | |
"google.golang.org/grpc" | |
) | |
// Return new lorem_grpc service |
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
package main | |
import ( | |
"net" | |
"flag" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc" | |
context "golang.org/x/net/context" | |
"google.golang.org/grpc" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc/pb" | |
"os" |
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
package lorem_grpc | |
import ( | |
"golang.org/x/net/context" | |
grpctransport "github.com/go-kit/kit/transport/grpc" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc/pb" | |
) | |
type grpcServer struct { | |
lorem grpctransport.Handler |
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
package lorem_grpc | |
import ( | |
"context" | |
"github.com/ru-rocker/gokit-playground/lorem-grpc/pb" | |
) | |
//Encode and Decode Lorem Request | |
func EncodeGRPCLoremRequest(_ context.Context, r interface{}) (interface{}, error) { | |
req := r.(LoremRequest) |