Versions in this module Expand all Collapse all v1 v1.1.5 Jan 29, 2018 Changes in this version + func InitSenderForLocalTestCluster(st *cluster.Settings, nodeDesc *roachpb.NodeDescriptor, ...) client.Sender + type BatchCall struct + Err error + Reply *roachpb.BatchResponse + type DBServer struct + func NewDBServer(ctx *base.Config, sender client.Sender, stopper *stop.Stopper) *DBServer + func (s *DBServer) Batch(ctx context.Context, args *roachpb.BatchRequest) (br *roachpb.BatchResponse, err error) + type DistSender struct + func NewDistSender(cfg DistSenderConfig, g *gossip.Gossip) *DistSender + func (ds *DistSender) CountRanges(ctx context.Context, rs roachpb.RSpan) (int64, error) + func (ds *DistSender) FirstRange() (*roachpb.RangeDescriptor, error) + func (ds *DistSender) GetParallelSendCount() int32 + func (ds *DistSender) LeaseHolderCache() *LeaseHolderCache + func (ds *DistSender) Metrics() DistSenderMetrics + func (ds *DistSender) RangeDescriptorCache() *RangeDescriptorCache + func (ds *DistSender) RangeLookup(ctx context.Context, key roachpb.RKey, desc *roachpb.RangeDescriptor, ...) ([]roachpb.RangeDescriptor, []roachpb.RangeDescriptor, *roachpb.Error) + func (ds *DistSender) Send(ctx context.Context, ba roachpb.BatchRequest) (*roachpb.BatchResponse, *roachpb.Error) + type DistSenderConfig struct + AmbientCtx log.AmbientContext + Clock *hlc.Clock + RPCContext *rpc.Context + RPCRetryOptions *retry.Options + RangeDescriptorDB RangeDescriptorDB + Settings *cluster.Settings + TestingKnobs DistSenderTestingKnobs + type DistSenderMetrics struct + BatchCount *metric.Counter + LocalSentCount *metric.Counter + NextReplicaErrCount *metric.Counter + NotLeaseHolderErrCount *metric.Counter + PartialBatchCount *metric.Counter + SentCount *metric.Counter + SlowRequestsCount *metric.Gauge + type DistSenderTestingKnobs struct + TransportFactory TransportFactory + func (*DistSenderTestingKnobs) ModuleTestingKnobs() + type EvictionToken struct + func (et *EvictionToken) Evict(ctx context.Context) error + func (et *EvictionToken) EvictAndReplace(ctx context.Context, newDescs ...roachpb.RangeDescriptor) error + type LeaseHolderCache struct + func NewLeaseHolderCache(size func() int64) *LeaseHolderCache + func (lc *LeaseHolderCache) Lookup(ctx context.Context, rangeID roachpb.RangeID) (roachpb.ReplicaDescriptor, bool) + func (lc *LeaseHolderCache) Update(ctx context.Context, rangeID roachpb.RangeID, ...) + type RangeDescriptorCache struct + func NewRangeDescriptorCache(db RangeDescriptorDB, size func() int64) *RangeDescriptorCache + func (rdc *RangeDescriptorCache) EvictCachedRangeDescriptor(ctx context.Context, descKey roachpb.RKey, seenDesc *roachpb.RangeDescriptor, ...) error + func (rdc *RangeDescriptorCache) GetCachedRangeDescriptor(key roachpb.RKey, inclusive bool) (*roachpb.RangeDescriptor, error) + func (rdc *RangeDescriptorCache) InsertRangeDescriptors(ctx context.Context, rs ...roachpb.RangeDescriptor) error + func (rdc *RangeDescriptorCache) LookupRangeDescriptor(ctx context.Context, key roachpb.RKey, evictToken *EvictionToken, ...) (*roachpb.RangeDescriptor, *EvictionToken, error) + func (rdc *RangeDescriptorCache) String() string + type RangeDescriptorDB interface + FirstRange func() (*roachpb.RangeDescriptor, error) + RangeLookup func(ctx context.Context, key roachpb.RKey, desc *roachpb.RangeDescriptor, ...) ([]roachpb.RangeDescriptor, []roachpb.RangeDescriptor, *roachpb.Error) + type RangeIterator struct + func NewRangeIterator(ds *DistSender) *RangeIterator + func (ri *RangeIterator) Desc() *roachpb.RangeDescriptor + func (ri *RangeIterator) Error() *roachpb.Error + func (ri *RangeIterator) Key() roachpb.RKey + func (ri *RangeIterator) LeaseHolder(ctx context.Context) (roachpb.ReplicaDescriptor, bool) + func (ri *RangeIterator) NeedAnother(rs roachpb.RSpan) bool + func (ri *RangeIterator) Next(ctx context.Context) + func (ri *RangeIterator) Seek(ctx context.Context, key roachpb.RKey, scanDir ScanDirection) + func (ri *RangeIterator) Token() *EvictionToken + func (ri *RangeIterator) Valid() bool + type ReplicaInfo struct + NodeDesc *roachpb.NodeDescriptor + type ReplicaSlice []ReplicaInfo + func NewReplicaSlice(gossip *gossip.Gossip, desc *roachpb.RangeDescriptor) ReplicaSlice + func (rs ReplicaSlice) FindReplica(storeID roachpb.StoreID) int + func (rs ReplicaSlice) FindReplicaByNodeID(nodeID roachpb.NodeID) int + func (rs ReplicaSlice) Len() int + func (rs ReplicaSlice) MoveToFront(i int) + func (rs ReplicaSlice) OptimizeReplicaOrder(nodeDesc *roachpb.NodeDescriptor) + func (rs ReplicaSlice) SortByCommonAttributePrefix(attrs []string) int + func (rs ReplicaSlice) Swap(i, j int) + type ScanDirection byte + const Ascending + const Descending + type SendOptions struct + type Transport interface + Close func() + IsExhausted func() bool + MoveToFront func(roachpb.ReplicaDescriptor) + NextReplica func() roachpb.ReplicaDescriptor + SendNext func(context.Context, chan<- BatchCall) + func GRPCTransportFactory(opts SendOptions, rpcContext *rpc.Context, replicas ReplicaSlice, ...) (Transport, error) + type TransportFactory func(SendOptions, *rpc.Context, ReplicaSlice, roachpb.BatchRequest) (Transport, error) + func SenderTransportFactory(tracer opentracing.Tracer, sender client.Sender) TransportFactory + type TxnCoordSender struct + func NewTxnCoordSender(ambient log.AmbientContext, st *cluster.Settings, wrapped client.Sender, ...) *TxnCoordSender + func (tc *TxnCoordSender) GetTxnState(txnID uuid.UUID) (roachpb.Transaction, bool) + func (tc *TxnCoordSender) Send(ctx context.Context, ba roachpb.BatchRequest) (*roachpb.BatchResponse, *roachpb.Error) + type TxnMetrics struct + Abandons *metric.CounterWithRates + Aborts *metric.CounterWithRates + Commits *metric.CounterWithRates + Commits1PC *metric.CounterWithRates + Durations *metric.Histogram + Restarts *metric.Histogram + RestartsDeleteRange *metric.Counter + RestartsPossibleReplay *metric.Counter + RestartsSerializable *metric.Counter + RestartsWriteTooOld *metric.Counter + func MakeTxnMetrics(histogramWindow time.Duration) TxnMetrics