seninel部署
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
odidev 8c4f251922
CI: Polish dependencies for ARM64 and add ARM64 job to Travis CI (#1765)
4 лет назад
..
src Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 5 лет назад
README.md Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 5 лет назад
pom.xml CI: Polish dependencies for ARM64 and add ARM64 job to Travis CI (#1765) 4 лет назад

README.md

Sentinel gRPC Adapter

Sentinel gRPC Adapter provides client and server interceptor for gRPC services.

Note that currently the interceptor only supports unary methods in gRPC.

Client Interceptor

Example:

public class ServiceClient {

    private final ManagedChannel channel;

    ServiceClient(String host, int port) {
        this.channel = ManagedChannelBuilder.forAddress(host, port)
            .intercept(new SentinelGrpcClientInterceptor()) // Add the client interceptor.
            .build();
        // Init your stub here.
    }
}

Server Interceptor

Example:

import io.grpc.Server;

Server server = ServerBuilder.forPort(port)
     .addService(new MyServiceImpl()) // Add your service.
     .intercept(new SentinelGrpcServerInterceptor()) // Add the server interceptor.
     .build();