MCPcopy
hub / github.com/grpc/grpc-go / childBalancer

Struct childBalancer

internal/xds/balancer/priority/balancer_child.go:33–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31var timeAfterFunc = time.AfterFunc
32
33type childBalancer struct {
34 name string
35 parent *priorityBalancer
36 parentCC balancer.ClientConn
37 balancerName string
38 cc *ignoreResolveNowClientConn
39
40 ignoreReresolutionRequests bool
41 config serviceconfig.LoadBalancingConfig
42 rState resolver.State
43
44 started bool
45 // This is set when the child reports TransientFailure, and unset when it
46 // reports Ready or Idle. It is used to decide whether the failover timer
47 // should start when the child is transitioning into Connecting. The timer
48 // will be restarted if the child has not reported TF more recently than it
49 // reported Ready or Idle.
50 reportedTF bool
51 // The latest state the child balancer provided.
52 state balancer.State
53 // The timer to give a priority some time to connect. And if the priority
54 // doesn't go into Ready/Failure, the next priority will be started.
55 initTimer *timerWrapper
56}
57
58// newChildBalancer creates a child balancer place holder, but doesn't
59// build/start the child balancer.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected