seninel部署
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
chenledong c8df7e7456 Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 5 anos atrás
..
src Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 5 anos atrás
README.md Improve RT statistic and exception tracing in Sentinel gRPC adapter (#995) 5 anos atrás
pom.xml Bump version to 1.7.0-SNAPSHOT 5 anos atrás

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();