diff options
Diffstat (limited to 'vendor/google.golang.org/grpc/internal/transport/defaults.go')
-rw-r--r-- | vendor/google.golang.org/grpc/internal/transport/defaults.go | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/google.golang.org/grpc/internal/transport/defaults.go b/vendor/google.golang.org/grpc/internal/transport/defaults.go new file mode 100644 index 0000000..9fa306b --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/transport/defaults.go | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright 2018 gRPC authors. | ||
4 | * | ||
5 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | * you may not use this file except in compliance with the License. | ||
7 | * You may obtain a copy of the License at | ||
8 | * | ||
9 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | * | ||
11 | * Unless required by applicable law or agreed to in writing, software | ||
12 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | * See the License for the specific language governing permissions and | ||
15 | * limitations under the License. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | package transport | ||
20 | |||
21 | import ( | ||
22 | "math" | ||
23 | "time" | ||
24 | ) | ||
25 | |||
26 | const ( | ||
27 | // The default value of flow control window size in HTTP2 spec. | ||
28 | defaultWindowSize = 65535 | ||
29 | // The initial window size for flow control. | ||
30 | initialWindowSize = defaultWindowSize // for an RPC | ||
31 | infinity = time.Duration(math.MaxInt64) | ||
32 | defaultClientKeepaliveTime = infinity | ||
33 | defaultClientKeepaliveTimeout = 20 * time.Second | ||
34 | defaultMaxStreamsClient = 100 | ||
35 | defaultMaxConnectionIdle = infinity | ||
36 | defaultMaxConnectionAge = infinity | ||
37 | defaultMaxConnectionAgeGrace = infinity | ||
38 | defaultServerKeepaliveTime = 2 * time.Hour | ||
39 | defaultServerKeepaliveTimeout = 20 * time.Second | ||
40 | defaultKeepalivePolicyMinTime = 5 * time.Minute | ||
41 | // max window limit set by HTTP2 Specs. | ||
42 | maxWindowSize = math.MaxInt32 | ||
43 | // defaultWriteQuota is the default value for number of data | ||
44 | // bytes that each stream can schedule before some of it being | ||
45 | // flushed out. | ||
46 | defaultWriteQuota = 64 * 1024 | ||
47 | defaultClientMaxHeaderListSize = uint32(16 << 20) | ||
48 | defaultServerMaxHeaderListSize = uint32(16 << 20) | ||
49 | ) | ||