grpcreflect-go

所属分类:微服务
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2023-07-26 22:19:57
上 传 者sh-1993
说明:  任何网络http服务器的gRPC兼容服务器反射。,
(gRPC-compatible server reflection for any net http server.,)

文件列表:
.golangci.yml (2272, 2023-11-16)
LICENSE (11349, 2023-11-16)
MAINTAINERS.md (181, 2023-11-16)
Makefile (2981, 2023-11-16)
SECURITY.md (156, 2023-11-16)
buf.gen.yaml (194, 2023-11-16)
buf.work.yaml (44, 2023-11-16)
client.go (17261, 2023-11-16)
client_example_test.go (1542, 2023-11-16)
client_test.go (5203, 2023-11-16)
go.mod (157, 2023-11-16)
go.sum (887, 2023-11-16)
go.work (45, 2023-11-16)
go.work.sum (275, 2023-11-16)
grpcreflect.go (16613, 2023-11-16)
grpcreflect_test.go (14642, 2023-11-16)
internal/ (0, 2023-11-16)
internal/gen/ (0, 2023-11-16)
internal/gen/go/ (0, 2023-11-16)
internal/gen/go/connect/ (0, 2023-11-16)
internal/gen/go/connect/reflecttest/ (0, 2023-11-16)
internal/gen/go/connect/reflecttest/v1/ (0, 2023-11-16)
internal/gen/go/connect/reflecttest/v1/reflecttest.pb.go (11501, 2023-11-16)
internal/gen/go/connect/reflecttest/v1/reflecttest_ext.pb.go (7101, 2023-11-16)
internal/gen/go/connectext/ (0, 2023-11-16)
internal/gen/go/connectext/grpc/ (0, 2023-11-16)
internal/gen/go/connectext/grpc/reflection/ (0, 2023-11-16)
internal/gen/go/connectext/grpc/reflection/v1/ (0, 2023-11-16)
internal/gen/go/connectext/grpc/reflection/v1/reflection.pb.go (42836, 2023-11-16)
... ...

grpcreflect =========== [![Build](https://github.com/connectrpc/grpcreflect-go/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/connectrpc/grpcreflect-go/actions/workflows/ci.yaml) [![Report Card](https://goreportcard.com/badge/connectrpc.com/grpcreflect)](https://goreportcard.com/report/connectrpc.com/grpcreflect) [![GoDoc](https://pkg.go.dev/badge/connectrpc.com/grpcreflect.svg)](https://pkg.go.dev/connectrpc.com/grpcreflect) `connectrpc.com/grpcreflect` adds support for gRPC's server reflection API to any `net/http` server — including those built with [Connect][connect]. With server reflection enabled, ad-hoc debugging tools can call your gRPC-compatible handlers and print the responses *without* a copy of the schema. The exposed reflection API is wire compatible with Google's gRPC implementations, so it works with [grpcurl], [grpcui], [BloomRPC], and many other tools. For more on Connect, see the [announcement blog post][blog], the documentation on [connectrpc.com][docs] (especially the [Getting Started] guide for Go), the [Connect][connect] repo, or the [demo service][examples-go]. ## Example ```go package main import ( "net/http" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "connectrpc.com/grpcreflect" ) func main() { mux := http.NewServeMux() reflector := grpcreflect.NewStaticReflector( "acme.user.v1.UserService", "acme.group.v1.GroupService", // protoc-gen-connect-go generates package-level constants // for these fully-qualified protobuf service names, so you'd more likely // reference userv1.UserServiceName and groupv1.GroupServiceName. ) mux.Handle(grpcreflect.NewHandlerV1(reflector)) // Many tools still expect the older version of the server reflection API, so // most servers should mount both handlers. mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector)) // If you don't need to support HTTP/2 without TLS (h2c), you can drop // x/net/http2 and use http.ListenAndServeTLS instead. http.ListenAndServe( ":8080", h2c.NewHandler(mux, &http2.Server{}), ) } ``` ## Status: Stable This module is stable. It supports: * The three most recent major releases of Go. Keep in mind that [only the last two releases receive security patches][go-support-policy]. * [APIv2] of Protocol Buffers in Go (`google.golang.org/protobuf`). Within those parameters, `grpcreflect` follows semantic versioning. We will _not_ make breaking changes in the 1.x series of releases. ## Legal Offered under the [Apache 2 license][license]. [APIv2]: https://blog.golang.org/protobuf-apiv2 [BloomRPC]: https://github.com/bloomrpc/bloomrpc [Getting Started]: https://connectrpc.com/go/getting-started [blog]: https://buf.build/blog/connect-a-better-grpc [connect]: https://github.com/connectrpc/connect-go [examples-go]: https://github.com/connectrpc/examples-go [docs]: https://connectrpc.com [go-support-policy]: https://golang.org/doc/devel/release#policy [grpcui]: https://github.com/fullstorydev/grpcui [grpcurl]: https://github.com/fullstorydev/grpcurl [license]: https://github.com/connectrpc/grpcreflect-go/blob/main/LICENSE.txt

近期下载者

相关文件


收藏者