cockroach: github.com/cockroachdb/cockroach/pkg/storage/closedts/transport Index | Files | Directories

package transport

import "github.com/cockroachdb/cockroach/pkg/storage/closedts/transport"

Index

Package Files

clients.go server.go

type Clients Uses

type Clients struct {
    // contains filtered or unexported fields
}

Clients manages clients receiving closed timestamp updates from peer nodes, along with facilities to request information about certain ranges. Received updates are relayed to a provided Notifyee.

func NewClients Uses

func NewClients(cfg Config) *Clients

NewClients sets up a client registry.

func (*Clients) EnsureClient Uses

func (pr *Clients) EnsureClient(nodeID roachpb.NodeID)

EnsureClient makes sure that updates from the given nodes are pulled in, if they aren't already. This call does not block (and is cheap).

func (*Clients) Request Uses

func (pr *Clients) Request(nodeID roachpb.NodeID, rangeID roachpb.RangeID)

Request is called when serving a follower read has failed due to missing or insufficient information. By calling this method, the caller gives the instruction to connect to the given node (if it hasn't already) and ask it to send (or re-send) up-to-date information about the specified range. Having done so, the information should soon thereafter be available to the Sink and from there, further follower read attempts. Does not block.

type Config Uses

type Config struct {
    Settings *cluster.Settings
    Stopper  *stop.Stopper
    NodeID   roachpb.NodeID
    Dialer   closedts.Dialer
    Sink     closedts.Notifyee
}

Config holds the information necessary to create a client registry.

type Server Uses

type Server struct {
    // contains filtered or unexported fields
}

Server handles incoming closed timestamp update stream requests.

func NewServer Uses

func NewServer(stopper *stop.Stopper, p closedts.Producer, refresh closedts.RefreshFn) *Server

NewServer sets up a Server which relays information from the given producer to incoming clients.

func (*Server) Get Uses

func (s *Server) Get(client ctpb.InboundClient) error

Get handles incoming client connections.

Directories

PathSynopsis
testutils

Package transport imports 13 packages (graph) and is imported by 1 packages. Updated 2019-08-10. Refresh now. Tools for package owners.