docs: update docs (#19676)
Co-authored-by: son trinh <son@decentrio.ventures> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
son trinh
Julien Robert
parent
2bf7e9f846
commit
2bfc037a07
@@ -1,40 +1,35 @@
|
||||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
// Copyright 2016 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
/*
|
||||
Package reflection implements server reflection service.
|
||||
// Package gogoreflection implements server reflection service.
|
||||
//
|
||||
// The service implemented is defined in:
|
||||
// https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
|
||||
//
|
||||
// To register server reflection on a gRPC server:
|
||||
//
|
||||
// import "google.golang.org/grpc/reflection"
|
||||
//
|
||||
// s := grpc.NewServer()
|
||||
// pb.RegisterYourOwnServer(s, &server{})
|
||||
//
|
||||
// // Register reflection service on gRPC server.
|
||||
// reflection.Register(s)
|
||||
//
|
||||
// s.Serve(lis)
|
||||
|
||||
The service implemented is defined in:
|
||||
https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
|
||||
|
||||
To register server reflection on a gRPC server:
|
||||
|
||||
import "google.golang.org/grpc/reflection"
|
||||
|
||||
s := grpc.NewServer()
|
||||
pb.RegisterYourOwnServer(s, &server{})
|
||||
|
||||
// Register reflection service on gRPC server.
|
||||
reflection.Register(s)
|
||||
|
||||
s.Serve(lis)
|
||||
*/
|
||||
package gogoreflection // import "google.golang.org/grpc/reflection"
|
||||
package gogoreflection
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
Reference in New Issue
Block a user