cubefs
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
19package transport20
21import (22"math"23"time"24)
25
26const (27// The default value of flow control window size in HTTP2 spec.28defaultWindowSize = 6553529// The initial window size for flow control.30initialWindowSize = defaultWindowSize // for an RPC31infinity = time.Duration(math.MaxInt64)32defaultClientKeepaliveTime = infinity33defaultClientKeepaliveTimeout = 20 * time.Second34defaultMaxStreamsClient = 10035defaultMaxConnectionIdle = infinity36defaultMaxConnectionAge = infinity37defaultMaxConnectionAgeGrace = infinity38defaultServerKeepaliveTime = 2 * time.Hour39defaultServerKeepaliveTimeout = 20 * time.Second40defaultKeepalivePolicyMinTime = 5 * time.Minute41// max window limit set by HTTP2 Specs.42maxWindowSize = math.MaxInt3243// defaultWriteQuota is the default value for number of data44// bytes that each stream can schedule before some of it being45// flushed out.46defaultWriteQuota = 64 * 102447defaultClientMaxHeaderListSize = uint32(16 << 20)48defaultServerMaxHeaderListSize = uint32(16 << 20)49)
50