Skip to content

Commit 0d07d4c

Browse files
authored
fix: update copyright to tencent (#8)
1 parent 5febfe1 commit 0d07d4c

55 files changed

Lines changed: 319 additions & 310 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ New files that you contribute should use the standard copyright header:
114114
//
115115
// Tencent is pleased to support the open source community by making tRPC available.
116116
//
117-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
117+
// Copyright (C) 2023 Tencent.
118118
// All rights reserved.
119119
//
120120
// If you have downloaded a copy of the tRPC source code from Tencent,

CONTRIBUTING.zh_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ go-codec 代码仓库中的文件不列出作者姓名,以避免混乱并避
104104
//
105105
// Tencent is pleased to support the open source community by making tRPC available.
106106
//
107-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
107+
// Copyright (C) 2023 Tencent.
108108
// All rights reserved.
109109
//
110110
// If you have downloaded a copy of the tRPC source code from Tencent,

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
1+
Copyright (C) 2023 Tencent. All rights reserved.
22

33
trpc-codec is licensed under the Apache License Version 2.0 except for the third-party components listed below.
44

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ This repository provides implementations and examples of other protocols, curren
99
* grpc: Supports grpc protocol
1010
* rawbinary: Supports the protocol where both request and response are `[]byte` under the udp transport layer protocol
1111
* rawstring: Supports the protocol where both request and response are string types under the tcp transport layer protocol, with strings separated by `"\n"`
12+
13+
## Copyright
14+
15+
The copyright notice pertaining to the Tencent code in this repo was previously in the name of “THL A29 Limited.” That entity has now been de-registered. You should treat all previously distributed copies of the code as if the copyright notice was in the name of “Tencent.”

grpc/client_transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Tencent is pleased to support the open source community by making tRPC available.
44
//
5-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
5+
// Copyright (C) 2023 Tencent.
66
// All rights reserved.
77
//
88
// If you have downloaded a copy of the tRPC source code from Tencent,

grpc/client_transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Tencent is pleased to support the open source community by making tRPC available.
44
//
5-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
5+
// Copyright (C) 2023 Tencent.
66
// All rights reserved.
77
//
88
// If you have downloaded a copy of the tRPC source code from Tencent,

grpc/codec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Tencent is pleased to support the open source community by making tRPC available.
44
//
5-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
5+
// Copyright (C) 2023 Tencent.
66
// All rights reserved.
77
//
88
// If you have downloaded a copy of the tRPC source code from Tencent,

grpc/codec_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Tencent is pleased to support the open source community by making tRPC available.
44
//
5-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
5+
// Copyright (C) 2023 Tencent.
66
// All rights reserved.
77
//
88
// If you have downloaded a copy of the tRPC source code from Tencent,

grpc/examples/clients/grpc/main.go

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Tencent is pleased to support the open source community by making tRPC available.
44
//
5-
// Copyright (C) 2023 THL A29 Limited, a Tencent company.
5+
// Copyright (C) 2023 Tencent.
66
// All rights reserved.
77
//
88
// If you have downloaded a copy of the tRPC source code from Tencent,
@@ -15,59 +15,59 @@
1515
package main
1616

1717
import (
18-
"context"
19-
"fmt"
20-
"log"
18+
"context"
19+
"fmt"
20+
"log"
2121

22-
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
23-
"go.opentelemetry.io/otel"
24-
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
25-
"go.opentelemetry.io/otel/propagation"
26-
sdktrace "go.opentelemetry.io/otel/sdk/trace"
27-
"google.golang.org/grpc"
28-
"google.golang.org/grpc/metadata"
29-
"trpc.group/trpc-go/trpc-codec/grpc/testdata/protocols/common"
30-
pb "trpc.group/trpc-go/trpc-codec/grpc/testdata/protocols/grpc"
22+
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
23+
"go.opentelemetry.io/otel"
24+
stdout "go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
25+
"go.opentelemetry.io/otel/propagation"
26+
sdktrace "go.opentelemetry.io/otel/sdk/trace"
27+
"google.golang.org/grpc"
28+
"google.golang.org/grpc/metadata"
29+
"trpc.group/trpc-go/trpc-codec/grpc/testdata/protocols/common"
30+
pb "trpc.group/trpc-go/trpc-codec/grpc/testdata/protocols/grpc"
3131
)
3232

3333
func main() {
34-
// create a client connection
35-
conn, err := grpc.Dial("127.0.0.1:5051", grpc.WithInsecure())
36-
if err != nil {
37-
panic(err)
38-
}
39-
defer conn.Close()
34+
// create a client connection
35+
conn, err := grpc.Dial("127.0.0.1:5051", grpc.WithInsecure())
36+
if err != nil {
37+
panic(err)
38+
}
39+
defer conn.Close()
4040

41-
// creates an Exporter
42-
exporter, err := stdout.New(stdout.WithPrettyPrint())
43-
if err != nil {
44-
log.Fatal(err)
45-
}
46-
// generate TracerProvider
47-
tp := sdktrace.NewTracerProvider(
48-
sdktrace.WithSampler(sdktrace.AlwaysSample()),
49-
sdktrace.WithBatcher(exporter),
50-
)
51-
// register TracerProvider
52-
otel.SetTracerProvider(tp)
53-
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
54-
tracer := otel.GetTracerProvider().Tracer("grpc-client")
55-
ctx, span := tracer.Start(context.Background(), "hello")
56-
defer span.End()
41+
// creates an Exporter
42+
exporter, err := stdout.New(stdout.WithPrettyPrint())
43+
if err != nil {
44+
log.Fatal(err)
45+
}
46+
// generate TracerProvider
47+
tp := sdktrace.NewTracerProvider(
48+
sdktrace.WithSampler(sdktrace.AlwaysSample()),
49+
sdktrace.WithBatcher(exporter),
50+
)
51+
// register TracerProvider
52+
otel.SetTracerProvider(tp)
53+
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
54+
tracer := otel.GetTracerProvider().Tracer("grpc-client")
55+
ctx, span := tracer.Start(context.Background(), "hello")
56+
defer span.End()
5757

58-
// injects correlation context and span context into the gRPC
59-
md := metadata.MD{}
60-
otelgrpc.Inject(ctx, &md)
58+
// injects correlation context and span context into the gRPC
59+
md := metadata.MD{}
60+
otelgrpc.Inject(ctx, &md)
6161

62-
// creates a new context with outgoing md attached
63-
ctx = metadata.NewOutgoingContext(ctx, md)
62+
// creates a new context with outgoing md attached
63+
ctx = metadata.NewOutgoingContext(ctx, md)
6464

65-
c := pb.NewGreeterClient(conn)
66-
// send rpc request
67-
if rsp, err := c.Hello(ctx, &common.HelloReq{Msg: "abc"}); err != nil {
68-
panic(err)
69-
} else {
70-
fmt.Print(rsp)
71-
}
65+
c := pb.NewGreeterClient(conn)
66+
// send rpc request
67+
if rsp, err := c.Hello(ctx, &common.HelloReq{Msg: "abc"}); err != nil {
68+
panic(err)
69+
} else {
70+
fmt.Print(rsp)
71+
}
7272

7373
}

0 commit comments

Comments
 (0)