Documentation ¶
Overview ¶
Package loadstore contains the loadStoreWrapper shared by the balancers.
Index ¶
- type Wrapper
- func (lsw *Wrapper) CallDropped(category string)
- func (lsw *Wrapper) CallFinished(locality string, err error)
- func (lsw *Wrapper) CallServerLoad(locality, name string, val float64)
- func (lsw *Wrapper) CallStarted(locality string)
- func (lsw *Wrapper) UpdateClusterAndService(cluster, edsService string)
- func (lsw *Wrapper) UpdateLoadStore(store *load.Store)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps a load store with cluster and edsService.
It's store and cluster/edsService can be updated separately. And it will update its internal perCluster store so that new stats will be added to the correct perCluster.
Note that this struct is a temporary workaround before we implement graceful switch for EDS. Any update to the clusterName and serviceName is too early, the perfect timing is when the picker is updated with the new connection. This early update could cause picks for the old SubConn being reported to the new services.
When the graceful switch in EDS is done, there should be no need for this struct. The policies that record/report load shouldn't need to handle update of lrsServerName/cluster/edsService. Its parent should do a graceful switch of the whole tree when one of that changes.
func (*Wrapper) CallDropped ¶
CallDropped records a call dropped in the store.
func (*Wrapper) CallFinished ¶
CallFinished records a call finished in the store.
func (*Wrapper) CallServerLoad ¶
CallServerLoad records the server load in the store.
func (*Wrapper) CallStarted ¶
CallStarted records a call started in the store.
func (*Wrapper) UpdateClusterAndService ¶
UpdateClusterAndService updates the cluster name and eds service for this wrapper. If any one of them is changed from before, the perCluster store in this wrapper will also be updated.
func (*Wrapper) UpdateLoadStore ¶
UpdateLoadStore updates the load store for this wrapper. If it is changed from before, the perCluster store in this wrapper will also be updated.