cockroach: github.com/cockroachdb/cockroach/pkg/gossip Index | Files | Directories

package gossip

import "github.com/cockroachdb/cockroach/pkg/gossip"

Package gossip implements a protocol for sharing information between Cockroach nodes using an ad-hoc, peer-to-peer network. The self-assembled network aims to minimize time for new information to reach each node, and minimize network traffic required.

Gossiped information is identified by key. Gossip information is captured by info objects.

Single-valued info values can have any type.

A map of info objects is kept by a Gossip instance. Single-valued info objects can be added via Gossip.AddInfo(). Info can be queried for single-valued keys via Gossip.GetInfo.

Index

Package Files

client.go disable_merges.go doc.go gossip.go gossip.pb.go info.go infostore.go keys.go node_set.go server.go status.go util.go

Constants

const (

    // NodeDescriptorInterval is the interval for gossiping the node descriptor.
    // Note that increasing this duration may increase the likelihood of gossip
    // thrashing, since node descriptors are used to determine the number of gossip
    // hops between nodes (see #9819 for context).
    NodeDescriptorInterval = 1 * time.Hour

    // NodeDescriptorTTL is time-to-live for node ID -> descriptor.
    NodeDescriptorTTL = 2 * NodeDescriptorInterval

    // StoresInterval is the default interval for gossiping store descriptors.
    StoresInterval = 60 * time.Second

    // StoreTTL is time-to-live for store-related info.
    StoreTTL = 2 * StoresInterval
)
const (
    // KeyClusterID is the unique UUID for this Cockroach cluster.
    // The value is a string UUID for the cluster.  The cluster ID is
    // gossiped by all nodes that contain a replica of the first range,
    // and it serves as a check for basic gossip connectivity. The
    // Gossip.Connected channel is closed when we see this key.
    KeyClusterID = "cluster-id"

    // KeyStorePrefix is the key prefix for gossiping stores in the network.
    // The suffix is a store ID and the value is roachpb.StoreDescriptor.
    KeyStorePrefix = "store"

    // KeyNodeIDPrefix is the key prefix for gossiping node id
    // addresses. The actual key is suffixed with the decimal
    // representation of the node id and the value is the host:port
    // string address of the node. E.g. node:1 => 127.0.0.1:24001
    KeyNodeIDPrefix = "node"

    // KeyHealthAlertPrefix is the key prefix for gossiping health alerts. The
    // value is a proto of type HealthCheckResult.
    KeyNodeHealthAlertPrefix = "health-alert"

    // KeyNodeLivenessPrefix is the key prefix for gossiping node liveness info.
    KeyNodeLivenessPrefix = "liveness"

    // KeySentinel is a key for gossip which must not expire or
    // else the node considers itself partitioned and will retry with
    // bootstrap hosts.  The sentinel is gossiped by the node that holds
    // the range lease for the first range.
    KeySentinel = "sentinel"

    // KeyFirstRangeDescriptor is the descriptor for the "first"
    // range. The "first" range contains the meta1 key range, the first
    // level of the bi-level key addressing scheme. The value is a slice
    // of storage.Replica structs.
    KeyFirstRangeDescriptor = "first-range"

    // KeySystemConfig is the gossip key for the system DB span.
    // The value if a config.SystemConfig which holds all key/value
    // pairs in the system DB span.
    KeySystemConfig = "system-db"

    // KeyDistSQLNodeVersionKeyPrefix is key prefix for each node's DistSQL
    // version.
    KeyDistSQLNodeVersionKeyPrefix = "distsql-version"

    // KeyDistSQLDrainingPrefix is the key prefix for each node's DistSQL
    // draining state.
    KeyDistSQLDrainingPrefix = "distsql-draining"

    // KeyTableStatAddedPrefix is the prefix for keys that indicate a new table
    // statistic was computed. The statistics themselves are not stored in gossip;
    // the keys are used to notify nodes to invalidate table statistic caches.
    KeyTableStatAddedPrefix = "table-stat-added"

    // KeyTableDisableMergesPrefix is the prefix for keys that indicate range
    // merges for the specified table ID should be disabled. This is used by
    // IMPORT and RESTORE to disable range merging while those operations are in
    // progress.
    KeyTableDisableMergesPrefix = "table-disable-merges"

    // KeyGossipClientsPrefix is the prefix for keys that indicate which gossip
    // client connections a node has open. This is used by other nodes in the
    // cluster to build a map of the gossip network.
    KeyGossipClientsPrefix = "gossip-clients"
)

Constants for gossip keys.

Variables

var (
    MetaConnectionsIncomingGauge = metric.Metadata{
        Name:        "gossip.connections.incoming",
        Help:        "Number of active incoming gossip connections",
        Measurement: "Connections",
        Unit:        metric.Unit_COUNT,
    }
    MetaConnectionsOutgoingGauge = metric.Metadata{
        Name:        "gossip.connections.outgoing",
        Help:        "Number of active outgoing gossip connections",
        Measurement: "Connections",
        Unit:        metric.Unit_COUNT,
    }
    MetaConnectionsRefused = metric.Metadata{
        Name:        "gossip.connections.refused",
        Help:        "Number of refused incoming gossip connections",
        Measurement: "Connections",
        Unit:        metric.Unit_COUNT,
    }
    MetaInfosSent = metric.Metadata{
        Name:        "gossip.infos.sent",
        Help:        "Number of sent gossip Info objects",
        Measurement: "Infos",
        Unit:        metric.Unit_COUNT,
    }
    MetaInfosReceived = metric.Metadata{
        Name:        "gossip.infos.received",
        Help:        "Number of received gossip Info objects",
        Measurement: "Infos",
        Unit:        metric.Unit_COUNT,
    }
    MetaBytesSent = metric.Metadata{
        Name:        "gossip.bytes.sent",
        Help:        "Number of sent gossip bytes",
        Measurement: "Gossip Bytes",
        Unit:        metric.Unit_BYTES,
    }
    MetaBytesReceived = metric.Metadata{
        Name:        "gossip.bytes.received",
        Help:        "Number of received gossip bytes",
        Measurement: "Gossip Bytes",
        Unit:        metric.Unit_BYTES,
    }
)

Gossip metrics counter names.

var (
    ErrInvalidLengthGossip = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGossip   = fmt.Errorf("proto: integer overflow")
)
var Redundant redundantCallbacks

Redundant is a callback option that specifies that the callback should be invoked even if the gossip value has not changed.

func AddressResolver Uses

func AddressResolver(gossip *Gossip) nodedialer.AddressResolver

AddressResolver is a thin wrapper around gossip's GetNodeIDAddress that allows it to be used as a nodedialer.AddressResolver

func IsNodeIDKey Uses

func IsNodeIDKey(key string) bool

IsNodeIDKey returns true iff the provided key is a valid node ID key.

func MakeDistSQLDrainingKey Uses

func MakeDistSQLDrainingKey(nodeID roachpb.NodeID) string

MakeDistSQLDrainingKey returns the gossip key for the given node's distsql draining state.

func MakeDistSQLNodeVersionKey Uses

func MakeDistSQLNodeVersionKey(nodeID roachpb.NodeID) string

MakeDistSQLNodeVersionKey returns the gossip key for the given store.

func MakeGossipClientsKey Uses

func MakeGossipClientsKey(nodeID roachpb.NodeID) string

MakeGossipClientsKey returns the gossip client key for the given node.

func MakeKey Uses

func MakeKey(components ...string) string

MakeKey creates a canonical key under which to gossip a piece of information. The first argument will typically be one of the key constants defined in this package.

func MakeNodeHealthAlertKey Uses

func MakeNodeHealthAlertKey(nodeID roachpb.NodeID) string

MakeNodeHealthAlertKey returns the gossip key under which the given node can gossip health alerts.

func MakeNodeIDKey Uses

func MakeNodeIDKey(nodeID roachpb.NodeID) string

MakeNodeIDKey returns the gossip key for node ID info.

func MakeNodeLivenessKey Uses

func MakeNodeLivenessKey(nodeID roachpb.NodeID) string

MakeNodeLivenessKey returns the gossip key for node liveness info.

func MakePrefixPattern Uses

func MakePrefixPattern(prefix string) string

MakePrefixPattern returns a regular expression pattern that matches precisely the Gossip keys created by invocations of MakeKey with multiple arguments for which the first argument is equal to the given prefix.

func MakeStoreKey Uses

func MakeStoreKey(storeID roachpb.StoreID) string

MakeStoreKey returns the gossip key for the given store.

func MakeTableDisableMergesKey Uses

func MakeTableDisableMergesKey(tableID uint32) string

MakeTableDisableMergesKey returns the gossip key used to disable merges for the specified table ID.

func MakeTableStatAddedKey Uses

func MakeTableStatAddedKey(tableID uint32) string

MakeTableStatAddedKey returns the gossip key used to notify that a new statistic is available for the given table.

func NewKeyNotPresentError Uses

func NewKeyNotPresentError(key string) error

NewKeyNotPresentError creates a new KeyNotPresentError.

func NodeIDFromKey Uses

func NodeIDFromKey(key string, prefix string) (roachpb.NodeID, error)

NodeIDFromKey attempts to extract a NodeID from the provided key after stripping the provided prefix. Returns an error if the key is not of the correct type or is not parsable.

func RegisterGossipServer Uses

func RegisterGossipServer(s *grpc.Server, srv GossipServer)

func StoreIDFromKey Uses

func StoreIDFromKey(storeKey string) (roachpb.StoreID, error)

StoreIDFromKey attempts to extract a StoreID from the provided key after stripping the provided prefix. Returns an error if the key is not of the correct type or is not parsable.

func TableIDFromTableStatAddedKey Uses

func TableIDFromTableStatAddedKey(key string) (uint32, error)

TableIDFromTableStatAddedKey attempts to extract the table ID from the provided key. The key should have been constructed by MakeTableStatAddedKey. Returns an error if the key is not of the correct type or is not parsable.

type BootstrapInfo Uses

type BootstrapInfo struct {
    // Addresses of other nodes in the cluster.
    Addresses []util.UnresolvedAddr `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses"`
    // Timestamp at which the bootstrap info was written.
    Timestamp hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp"`
}

BootstrapInfo contains information necessary to bootstrap the gossip network from a cold start.

func (*BootstrapInfo) Descriptor Uses

func (*BootstrapInfo) Descriptor() ([]byte, []int)

func (*BootstrapInfo) Marshal Uses

func (m *BootstrapInfo) Marshal() (dAtA []byte, err error)

func (*BootstrapInfo) MarshalTo Uses

func (m *BootstrapInfo) MarshalTo(dAtA []byte) (int, error)

func (*BootstrapInfo) ProtoMessage Uses

func (*BootstrapInfo) ProtoMessage()

func (*BootstrapInfo) Reset Uses

func (m *BootstrapInfo) Reset()

func (*BootstrapInfo) Size Uses

func (m *BootstrapInfo) Size() (n int)

func (*BootstrapInfo) String Uses

func (m *BootstrapInfo) String() string

func (*BootstrapInfo) Unmarshal Uses

func (m *BootstrapInfo) Unmarshal(dAtA []byte) error

func (*BootstrapInfo) XXX_DiscardUnknown Uses

func (m *BootstrapInfo) XXX_DiscardUnknown()

func (*BootstrapInfo) XXX_Marshal Uses

func (m *BootstrapInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BootstrapInfo) XXX_Merge Uses

func (dst *BootstrapInfo) XXX_Merge(src proto.Message)

func (*BootstrapInfo) XXX_Size Uses

func (m *BootstrapInfo) XXX_Size() int

func (*BootstrapInfo) XXX_Unmarshal Uses

func (m *BootstrapInfo) XXX_Unmarshal(b []byte) error

type Callback Uses

type Callback func(string, roachpb.Value)

Callback is a callback method to be invoked on gossip update of info denoted by key.

type CallbackOption Uses

type CallbackOption interface {
    // contains filtered or unexported methods
}

CallbackOption is a marker interface that callback options must implement.

type ClientStatus Uses

type ClientStatus struct {
    ConnStatus []OutgoingConnStatus `protobuf:"bytes,1,rep,name=conn_status,json=connStatus,proto3" json:"conn_status"`
    MaxConns   int32                `protobuf:"varint,2,opt,name=max_conns,json=maxConns,proto3" json:"max_conns,omitempty"`
}

func (*ClientStatus) Descriptor Uses

func (*ClientStatus) Descriptor() ([]byte, []int)

func (*ClientStatus) Marshal Uses

func (m *ClientStatus) Marshal() (dAtA []byte, err error)

func (*ClientStatus) MarshalTo Uses

func (m *ClientStatus) MarshalTo(dAtA []byte) (int, error)

func (*ClientStatus) ProtoMessage Uses

func (*ClientStatus) ProtoMessage()

func (*ClientStatus) Reset Uses

func (m *ClientStatus) Reset()

func (*ClientStatus) Size Uses

func (m *ClientStatus) Size() (n int)

func (ClientStatus) String Uses

func (c ClientStatus) String() string

func (*ClientStatus) Unmarshal Uses

func (m *ClientStatus) Unmarshal(dAtA []byte) error

func (*ClientStatus) XXX_DiscardUnknown Uses

func (m *ClientStatus) XXX_DiscardUnknown()

func (*ClientStatus) XXX_Marshal Uses

func (m *ClientStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientStatus) XXX_Merge Uses

func (dst *ClientStatus) XXX_Merge(src proto.Message)

func (*ClientStatus) XXX_Size Uses

func (m *ClientStatus) XXX_Size() int

func (*ClientStatus) XXX_Unmarshal Uses

func (m *ClientStatus) XXX_Unmarshal(b []byte) error

type ConnStatus Uses

type ConnStatus struct {
    NodeID   github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    Address  string                                              `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
    AgeNanos int64                                               `protobuf:"varint,3,opt,name=age_nanos,json=ageNanos,proto3" json:"age_nanos,omitempty"`
}

func (*ConnStatus) Descriptor Uses

func (*ConnStatus) Descriptor() ([]byte, []int)

func (*ConnStatus) Marshal Uses

func (m *ConnStatus) Marshal() (dAtA []byte, err error)

func (*ConnStatus) MarshalTo Uses

func (m *ConnStatus) MarshalTo(dAtA []byte) (int, error)

func (*ConnStatus) ProtoMessage Uses

func (*ConnStatus) ProtoMessage()

func (*ConnStatus) Reset Uses

func (m *ConnStatus) Reset()

func (*ConnStatus) Size Uses

func (m *ConnStatus) Size() (n int)

func (ConnStatus) String Uses

func (c ConnStatus) String() string

func (*ConnStatus) Unmarshal Uses

func (m *ConnStatus) Unmarshal(dAtA []byte) error

func (*ConnStatus) XXX_DiscardUnknown Uses

func (m *ConnStatus) XXX_DiscardUnknown()

func (*ConnStatus) XXX_Marshal Uses

func (m *ConnStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnStatus) XXX_Merge Uses

func (dst *ConnStatus) XXX_Merge(src proto.Message)

func (*ConnStatus) XXX_Size Uses

func (m *ConnStatus) XXX_Size() int

func (*ConnStatus) XXX_Unmarshal Uses

func (m *ConnStatus) XXX_Unmarshal(b []byte) error

type Connectivity Uses

type Connectivity struct {
    SentinelNodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=sentinel_node_id,json=sentinelNodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"sentinel_node_id,omitempty"`
    ClientConns    []Connectivity_Conn                                 `protobuf:"bytes,2,rep,name=client_conns,json=clientConns,proto3" json:"client_conns"`
}

func (*Connectivity) Descriptor Uses

func (*Connectivity) Descriptor() ([]byte, []int)

func (*Connectivity) Marshal Uses

func (m *Connectivity) Marshal() (dAtA []byte, err error)

func (*Connectivity) MarshalTo Uses

func (m *Connectivity) MarshalTo(dAtA []byte) (int, error)

func (*Connectivity) ProtoMessage Uses

func (*Connectivity) ProtoMessage()

func (*Connectivity) Reset Uses

func (m *Connectivity) Reset()

func (*Connectivity) Size Uses

func (m *Connectivity) Size() (n int)

func (Connectivity) String Uses

func (c Connectivity) String() string

func (*Connectivity) Unmarshal Uses

func (m *Connectivity) Unmarshal(dAtA []byte) error

func (*Connectivity) XXX_DiscardUnknown Uses

func (m *Connectivity) XXX_DiscardUnknown()

func (*Connectivity) XXX_Marshal Uses

func (m *Connectivity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Connectivity) XXX_Merge Uses

func (dst *Connectivity) XXX_Merge(src proto.Message)

func (*Connectivity) XXX_Size Uses

func (m *Connectivity) XXX_Size() int

func (*Connectivity) XXX_Unmarshal Uses

func (m *Connectivity) XXX_Unmarshal(b []byte) error

type Connectivity_Conn Uses

type Connectivity_Conn struct {
    SourceID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=source_id,json=sourceId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"source_id,omitempty"`
    TargetID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,2,opt,name=target_id,json=targetId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"target_id,omitempty"`
}

func (*Connectivity_Conn) Descriptor Uses

func (*Connectivity_Conn) Descriptor() ([]byte, []int)

func (*Connectivity_Conn) Marshal Uses

func (m *Connectivity_Conn) Marshal() (dAtA []byte, err error)

func (*Connectivity_Conn) MarshalTo Uses

func (m *Connectivity_Conn) MarshalTo(dAtA []byte) (int, error)

func (*Connectivity_Conn) ProtoMessage Uses

func (*Connectivity_Conn) ProtoMessage()

func (*Connectivity_Conn) Reset Uses

func (m *Connectivity_Conn) Reset()

func (*Connectivity_Conn) Size Uses

func (m *Connectivity_Conn) Size() (n int)

func (*Connectivity_Conn) String Uses

func (m *Connectivity_Conn) String() string

func (*Connectivity_Conn) Unmarshal Uses

func (m *Connectivity_Conn) Unmarshal(dAtA []byte) error

func (*Connectivity_Conn) XXX_DiscardUnknown Uses

func (m *Connectivity_Conn) XXX_DiscardUnknown()

func (*Connectivity_Conn) XXX_Marshal Uses

func (m *Connectivity_Conn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Connectivity_Conn) XXX_Merge Uses

func (dst *Connectivity_Conn) XXX_Merge(src proto.Message)

func (*Connectivity_Conn) XXX_Size Uses

func (m *Connectivity_Conn) XXX_Size() int

func (*Connectivity_Conn) XXX_Unmarshal Uses

func (m *Connectivity_Conn) XXX_Unmarshal(b []byte) error

type Gossip Uses

type Gossip struct {
    Connected chan struct{} // Closed upon initial connection
    // contains filtered or unexported fields
}

Gossip is an instance of a gossip node. It embeds a gossip server. During bootstrapping, the bootstrap list contains candidates for entry to the gossip network.

func New Uses

func New(
    ambient log.AmbientContext,
    clusterID *base.ClusterIDContainer,
    nodeID *base.NodeIDContainer,
    rpcContext *rpc.Context,
    grpcServer *grpc.Server,
    stopper *stop.Stopper,
    registry *metric.Registry,
    locality roachpb.Locality,
    defaultZoneConfig *config.ZoneConfig,
) *Gossip

New creates an instance of a gossip node. The higher level manages the ClusterIDContainer and NodeIDContainer instances (which can be shared by various server components). The ambient context is expected to already contain the node ID.

grpcServer: The server on which the new Gossip instance will register its RPC

service. Can be nil, in which case the Gossip will not register the
service.

rpcContext: The context used to connect to other nodes. Can be nil for tests

that also specify a nil grpcServer and that plan on using the Gossip in a
restricted way by populating it with data manually.

func NewTest Uses

func NewTest(
    nodeID roachpb.NodeID,
    rpcContext *rpc.Context,
    grpcServer *grpc.Server,
    stopper *stop.Stopper,
    registry *metric.Registry,
    defaultZoneConfig *config.ZoneConfig,
) *Gossip

NewTest is a simplified wrapper around New that creates the ClusterIDContainer and NodeIDContainer internally. Used for testing.

grpcServer: The server on which the new Gossip instance will register its RPC

service. Can be nil, in which case the Gossip will not register the
service.

rpcContext: The context used to connect to other nodes. Can be nil for tests

that also specify a nil grpcServer and that plan on using the Gossip in a
restricted way by populating it with data manually.

func NewTestWithLocality Uses

func NewTestWithLocality(
    nodeID roachpb.NodeID,
    rpcContext *rpc.Context,
    grpcServer *grpc.Server,
    stopper *stop.Stopper,
    registry *metric.Registry,
    locality roachpb.Locality,
    defaultZoneConfig *config.ZoneConfig,
) *Gossip

NewTestWithLocality calls NewTest with an explicit locality value.

func (*Gossip) AddClusterID Uses

func (g *Gossip) AddClusterID(val uuid.UUID) error

AddClusterID is a convenience method for gossipping the cluster ID. There's no TTL - the record lives forever.

func (*Gossip) AddInfo Uses

func (g *Gossip) AddInfo(key string, val []byte, ttl time.Duration) error

AddInfo adds or updates an info object. Returns an error if info couldn't be added.

func (*Gossip) AddInfoProto Uses

func (g *Gossip) AddInfoProto(key string, msg protoutil.Message, ttl time.Duration) error

AddInfoProto adds or updates an info object. Returns an error if info couldn't be added.

func (*Gossip) Connectivity Uses

func (g *Gossip) Connectivity() Connectivity

Connectivity returns the current view of the gossip network as seen by this node.

func (*Gossip) DisableMerges Uses

func (g *Gossip) DisableMerges(ctx context.Context, tableIDs []uint32)

DisableMerges starts a goroutine which periodically gossips keys that disable merging for the specified table IDs. The goroutine until the associated context is done (usually via cancellation).

func (*Gossip) EnableSimulationCycler Uses

func (g *Gossip) EnableSimulationCycler(enable bool)

EnableSimulationCycler is for TESTING PURPOSES ONLY. It sets a condition variable which is signaled at each cycle of the simulation via SimulationCycle(). The gossip server makes each connecting client wait for the cycler to signal before responding.

func (*Gossip) GetClusterID Uses

func (g *Gossip) GetClusterID() (uuid.UUID, error)

GetClusterID returns the cluster ID if it has been gossipped. If it hasn't, (so if this gossip instance is not "connected"), an error is returned.

func (*Gossip) GetInfo Uses

func (g *Gossip) GetInfo(key string) ([]byte, error)

GetInfo returns an info value by key or an KeyNotPresentError if specified key does not exist or has expired.

func (*Gossip) GetInfoProto Uses

func (g *Gossip) GetInfoProto(key string, msg protoutil.Message) error

GetInfoProto returns an info value by key or KeyNotPresentError if specified key does not exist or has expired.

func (*Gossip) GetInfoStatus Uses

func (g *Gossip) GetInfoStatus() InfoStatus

GetInfoStatus returns the a copy of the contents of the infostore.

func (Gossip) GetNodeAddr Uses

func (s Gossip) GetNodeAddr() *util.UnresolvedAddr

GetNodeAddr returns the node's address stored in the Infostore.

func (*Gossip) GetNodeDescriptor Uses

func (g *Gossip) GetNodeDescriptor(nodeID roachpb.NodeID) (*roachpb.NodeDescriptor, error)

GetNodeDescriptor looks up the descriptor of the node by ID.

func (*Gossip) GetNodeIDAddress Uses

func (g *Gossip) GetNodeIDAddress(nodeID roachpb.NodeID) (*util.UnresolvedAddr, error)

GetNodeIDAddress looks up the RPC address of the node by ID.

func (*Gossip) GetNodeIDForStoreID Uses

func (g *Gossip) GetNodeIDForStoreID(storeID roachpb.StoreID) (roachpb.NodeID, error)

GetNodeIDForStoreID looks up the NodeID by StoreID.

func (*Gossip) GetNodeIDSQLAddress Uses

func (g *Gossip) GetNodeIDSQLAddress(nodeID roachpb.NodeID) (*util.UnresolvedAddr, error)

GetNodeIDSQLAddress looks up the SQL address of the node by ID.

func (*Gossip) GetNodeMetrics Uses

func (g *Gossip) GetNodeMetrics() *Metrics

GetNodeMetrics returns the gossip node metrics.

func (*Gossip) GetResolvers Uses

func (g *Gossip) GetResolvers() []resolver.Resolver

GetResolvers returns a copy of the resolvers slice.

func (*Gossip) GetSystemConfig Uses

func (g *Gossip) GetSystemConfig() *config.SystemConfig

GetSystemConfig returns the local unmarshaled version of the system config. Returns nil if the system config hasn't been set yet.

func (Gossip) Gossip Uses

func (s Gossip) Gossip(stream Gossip_GossipServer) error

Gossip receives gossiped information from a peer node. The received delta is combined with the infostore, and this node's own gossip is returned to requesting client.

func (*Gossip) Incoming Uses

func (g *Gossip) Incoming() []roachpb.NodeID

Incoming returns a slice of incoming gossip client connection node IDs.

func (*Gossip) InfoOriginatedHere Uses

func (g *Gossip) InfoOriginatedHere(key string) bool

InfoOriginatedHere returns true iff the latest info for the provided key originated on this node. This is useful for ensuring that the system config is regossiped as soon as possible when its lease changes hands.

func (*Gossip) IterateInfos Uses

func (g *Gossip) IterateInfos(prefix string, visit func(k string, info Info) error) error

IterateInfos visits all infos matching the given prefix.

func (*Gossip) LogStatus Uses

func (g *Gossip) LogStatus()

LogStatus logs the current status of gossip such as the incoming and outgoing connections.

func (*Gossip) MaxHops Uses

func (g *Gossip) MaxHops() uint32

MaxHops returns the maximum number of hops to reach any other node in the system, according to the infos which have reached this node via gossip network.

func (*Gossip) Outgoing Uses

func (g *Gossip) Outgoing() []roachpb.NodeID

Outgoing returns a slice of outgoing gossip client connection node IDs. Note that these outgoing client connections may not actually be legitimately connected. They may be in the process of trying, or may already have failed, but haven't yet been processed by the gossip instance.

func (*Gossip) RegisterCallback Uses

func (g *Gossip) RegisterCallback(pattern string, method Callback, opts ...CallbackOption) func()

RegisterCallback registers a callback for a key pattern to be invoked whenever new info for a gossip key matching pattern is received. The callback method is invoked with the info key which matched pattern. Returns a function to unregister the callback.

func (*Gossip) RegisterSystemConfigChannel Uses

func (g *Gossip) RegisterSystemConfigChannel() <-chan struct{}

RegisterSystemConfigChannel registers a channel to signify updates for the system config. It is notified after registration (if a system config is already set), and whenever a new system config is successfully unmarshaled.

func (*Gossip) SetBootstrapInterval Uses

func (g *Gossip) SetBootstrapInterval(interval time.Duration)

SetBootstrapInterval sets a minimum interval between successive attempts to connect to new hosts in order to join the gossip network.

func (*Gossip) SetCullInterval Uses

func (g *Gossip) SetCullInterval(interval time.Duration)

SetCullInterval sets the interval between periodic shutdown of outgoing gossip client connections in an effort to improve the fitness of the network.

func (*Gossip) SetNodeDescriptor Uses

func (g *Gossip) SetNodeDescriptor(desc *roachpb.NodeDescriptor) error

SetNodeDescriptor adds the node descriptor to the gossip network.

func (*Gossip) SetStallInterval Uses

func (g *Gossip) SetStallInterval(interval time.Duration)

SetStallInterval sets the interval between successive checks to determine whether this host is not connected to the gossip network, or else is connected to a partition which doesn't include the host which gossips the sentinel info.

func (*Gossip) SetStorage Uses

func (g *Gossip) SetStorage(storage Storage) error

SetStorage provides an instance of the Storage interface for reading and writing gossip bootstrap data from persistent storage. This should be invoked as early in the lifecycle of a gossip instance as possible, but can be called at any time.

func (*Gossip) SimulationCycle Uses

func (g *Gossip) SimulationCycle()

SimulationCycle cycles this gossip node's server by allowing all connected clients to proceed one step.

func (*Gossip) Start Uses

func (g *Gossip) Start(advertAddr net.Addr, resolvers []resolver.Resolver)

Start launches the gossip instance, which commences joining the gossip network using the supplied rpc server and previously known peer addresses in addition to any bootstrap addresses specified via --join and passed to this method via the resolvers parameter.

The supplied advertised address is used to identify the gossip instance in the gossip network; it will be used by other instances to connect to this instance.

This method starts bootstrap loop, gossip server, and client management in separate goroutines and returns.

func (*Gossip) Stopper Uses

func (g *Gossip) Stopper() *stop.Stopper

Stopper returns the stopper for this gossip instance.

type GossipClient Uses

type GossipClient interface {
    Gossip(ctx context.Context, opts ...grpc.CallOption) (Gossip_GossipClient, error)
}

GossipClient is the client API for Gossip service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGossipClient Uses

func NewGossipClient(cc *grpc.ClientConn) GossipClient

type GossipServer Uses

type GossipServer interface {
    Gossip(Gossip_GossipServer) error
}

GossipServer is the server API for Gossip service.

type Gossip_GossipClient Uses

type Gossip_GossipClient interface {
    Send(*Request) error
    Recv() (*Response, error)
    grpc.ClientStream
}

type Gossip_GossipServer Uses

type Gossip_GossipServer interface {
    Send(*Response) error
    Recv() (*Request, error)
    grpc.ServerStream
}

type Info Uses

type Info struct {
    Value roachpb.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value"`
    // Wall time of info when generated by originating node (Unix-nanos).
    OrigStamp int64 `protobuf:"varint,2,opt,name=orig_stamp,json=origStamp,proto3" json:"orig_stamp,omitempty"`
    // Wall time when info is to be discarded (Unix-nanos).
    TTLStamp int64 `protobuf:"varint,3,opt,name=ttl_stamp,json=ttlStamp,proto3" json:"ttl_stamp,omitempty"`
    // Number of hops from originator.
    Hops uint32 `protobuf:"varint,4,opt,name=hops,proto3" json:"hops,omitempty"`
    // Originating node's ID.
    NodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,5,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    // Peer node ID which passed this info.
    PeerID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,6,opt,name=peer_id,json=peerId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"peer_id,omitempty"`
}

Info is the basic unit of information traded over the gossip network.

func (*Info) Descriptor Uses

func (*Info) Descriptor() ([]byte, []int)

func (*Info) Marshal Uses

func (m *Info) Marshal() (dAtA []byte, err error)

func (*Info) MarshalTo Uses

func (m *Info) MarshalTo(dAtA []byte) (int, error)

func (*Info) ProtoMessage Uses

func (*Info) ProtoMessage()

func (*Info) Reset Uses

func (m *Info) Reset()

func (*Info) Size Uses

func (m *Info) Size() (n int)

func (*Info) String Uses

func (m *Info) String() string

func (*Info) Unmarshal Uses

func (m *Info) Unmarshal(dAtA []byte) error

func (*Info) XXX_DiscardUnknown Uses

func (m *Info) XXX_DiscardUnknown()

func (*Info) XXX_Marshal Uses

func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Info) XXX_Merge Uses

func (dst *Info) XXX_Merge(src proto.Message)

func (*Info) XXX_Size Uses

func (m *Info) XXX_Size() int

func (*Info) XXX_Unmarshal Uses

func (m *Info) XXX_Unmarshal(b []byte) error

type InfoStatus Uses

type InfoStatus struct {
    Infos        map[string]Info `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    Client       ClientStatus    `protobuf:"bytes,2,opt,name=client,proto3" json:"client"`
    Server       ServerStatus    `protobuf:"bytes,3,opt,name=server,proto3" json:"server"`
    Connectivity Connectivity    `protobuf:"bytes,4,opt,name=connectivity,proto3" json:"connectivity"`
}

InfoStatus contains information about the current status of the infoStore.

func (*InfoStatus) Descriptor Uses

func (*InfoStatus) Descriptor() ([]byte, []int)

func (*InfoStatus) Marshal Uses

func (m *InfoStatus) Marshal() (dAtA []byte, err error)

func (*InfoStatus) MarshalTo Uses

func (m *InfoStatus) MarshalTo(dAtA []byte) (int, error)

func (*InfoStatus) ProtoMessage Uses

func (*InfoStatus) ProtoMessage()

func (*InfoStatus) Reset Uses

func (m *InfoStatus) Reset()

func (*InfoStatus) Size Uses

func (m *InfoStatus) Size() (n int)

func (*InfoStatus) String Uses

func (m *InfoStatus) String() string

func (*InfoStatus) Unmarshal Uses

func (m *InfoStatus) Unmarshal(dAtA []byte) error

func (*InfoStatus) XXX_DiscardUnknown Uses

func (m *InfoStatus) XXX_DiscardUnknown()

func (*InfoStatus) XXX_Marshal Uses

func (m *InfoStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoStatus) XXX_Merge Uses

func (dst *InfoStatus) XXX_Merge(src proto.Message)

func (*InfoStatus) XXX_Size Uses

func (m *InfoStatus) XXX_Size() int

func (*InfoStatus) XXX_Unmarshal Uses

func (m *InfoStatus) XXX_Unmarshal(b []byte) error

type KeyNotPresentError Uses

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

KeyNotPresentError is returned by gossip when queried for a key that doesn't exist of has expired.

func (KeyNotPresentError) Error Uses

func (err KeyNotPresentError) Error() string

Error implements the error interface.

type MetricSnap Uses

type MetricSnap struct {
    BytesReceived int64 `protobuf:"varint,2,opt,name=bytes_received,json=bytesReceived,proto3" json:"bytes_received,omitempty"`
    BytesSent     int64 `protobuf:"varint,3,opt,name=bytes_sent,json=bytesSent,proto3" json:"bytes_sent,omitempty"`
    InfosReceived int64 `protobuf:"varint,4,opt,name=infos_received,json=infosReceived,proto3" json:"infos_received,omitempty"`
    InfosSent     int64 `protobuf:"varint,5,opt,name=infos_sent,json=infosSent,proto3" json:"infos_sent,omitempty"`
    ConnsRefused  int64 `protobuf:"varint,6,opt,name=conns_refused,json=connsRefused,proto3" json:"conns_refused,omitempty"`
}

func (*MetricSnap) Descriptor Uses

func (*MetricSnap) Descriptor() ([]byte, []int)

func (*MetricSnap) Marshal Uses

func (m *MetricSnap) Marshal() (dAtA []byte, err error)

func (*MetricSnap) MarshalTo Uses

func (m *MetricSnap) MarshalTo(dAtA []byte) (int, error)

func (*MetricSnap) ProtoMessage Uses

func (*MetricSnap) ProtoMessage()

func (*MetricSnap) Reset Uses

func (m *MetricSnap) Reset()

func (*MetricSnap) Size Uses

func (m *MetricSnap) Size() (n int)

func (MetricSnap) String Uses

func (m MetricSnap) String() string

func (*MetricSnap) Unmarshal Uses

func (m *MetricSnap) Unmarshal(dAtA []byte) error

func (*MetricSnap) XXX_DiscardUnknown Uses

func (m *MetricSnap) XXX_DiscardUnknown()

func (*MetricSnap) XXX_Marshal Uses

func (m *MetricSnap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricSnap) XXX_Merge Uses

func (dst *MetricSnap) XXX_Merge(src proto.Message)

func (*MetricSnap) XXX_Size Uses

func (m *MetricSnap) XXX_Size() int

func (*MetricSnap) XXX_Unmarshal Uses

func (m *MetricSnap) XXX_Unmarshal(b []byte) error

type Metrics Uses

type Metrics struct {
    ConnectionsRefused *metric.Counter
    BytesReceived      *metric.Counter
    BytesSent          *metric.Counter
    InfosReceived      *metric.Counter
    InfosSent          *metric.Counter
}

Metrics contains gossip metrics used per node and server.

func (Metrics) Snapshot Uses

func (m Metrics) Snapshot() MetricSnap

Snapshot returns a snapshot of the metrics.

func (Metrics) String Uses

func (m Metrics) String() string

type OutgoingConnStatus Uses

type OutgoingConnStatus struct {
    ConnStatus `protobuf:"bytes,1,opt,name=conn_status,json=connStatus,proto3,embedded=conn_status" json:"conn_status"`
    MetricSnap `protobuf:"bytes,2,opt,name=metrics,proto3,embedded=metrics" json:"metrics"`
}

func (*OutgoingConnStatus) Descriptor Uses

func (*OutgoingConnStatus) Descriptor() ([]byte, []int)

func (*OutgoingConnStatus) Marshal Uses

func (m *OutgoingConnStatus) Marshal() (dAtA []byte, err error)

func (*OutgoingConnStatus) MarshalTo Uses

func (m *OutgoingConnStatus) MarshalTo(dAtA []byte) (int, error)

func (*OutgoingConnStatus) ProtoMessage Uses

func (*OutgoingConnStatus) ProtoMessage()

func (*OutgoingConnStatus) Reset Uses

func (m *OutgoingConnStatus) Reset()

func (*OutgoingConnStatus) Size Uses

func (m *OutgoingConnStatus) Size() (n int)

func (OutgoingConnStatus) String Uses

func (c OutgoingConnStatus) String() string

func (*OutgoingConnStatus) Unmarshal Uses

func (m *OutgoingConnStatus) Unmarshal(dAtA []byte) error

func (*OutgoingConnStatus) XXX_DiscardUnknown Uses

func (m *OutgoingConnStatus) XXX_DiscardUnknown()

func (*OutgoingConnStatus) XXX_Marshal Uses

func (m *OutgoingConnStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutgoingConnStatus) XXX_Merge Uses

func (dst *OutgoingConnStatus) XXX_Merge(src proto.Message)

func (*OutgoingConnStatus) XXX_Size Uses

func (m *OutgoingConnStatus) XXX_Size() int

func (*OutgoingConnStatus) XXX_Unmarshal Uses

func (m *OutgoingConnStatus) XXX_Unmarshal(b []byte) error

type Request Uses

type Request struct {
    // Requesting node's ID.
    NodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    // Address of the requesting client.
    Addr util.UnresolvedAddr `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr"`
    // Map of high water timestamps from infos originating at other
    // nodes, as seen by the requester.
    HighWaterStamps map[github_com_cockroachdb_cockroach_pkg_roachpb.NodeID]int64 `protobuf:"bytes,3,rep,name=high_water_stamps,json=highWaterStamps,proto3,castkey=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"high_water_stamps" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
    // Delta of Infos originating at sender.
    Delta map[string]*Info `protobuf:"bytes,4,rep,name=delta,proto3" json:"delta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // Cluster ID to prevent illegal connections.
    ClusterID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,5,opt,name=cluster_id,json=clusterId,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"cluster_id"`
}

Request is the request struct passed with the Gossip RPC.

func (*Request) Descriptor Uses

func (*Request) Descriptor() ([]byte, []int)

func (*Request) Marshal Uses

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo Uses

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) ProtoMessage Uses

func (*Request) ProtoMessage()

func (*Request) Reset Uses

func (m *Request) Reset()

func (*Request) Size Uses

func (m *Request) Size() (n int)

func (*Request) String Uses

func (m *Request) String() string

func (*Request) Unmarshal Uses

func (m *Request) Unmarshal(dAtA []byte) error

func (*Request) XXX_DiscardUnknown Uses

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal Uses

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge Uses

func (dst *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size Uses

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal Uses

func (m *Request) XXX_Unmarshal(b []byte) error

type Response Uses

type Response struct {
    // Responding Node's ID.
    NodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    // Address of the responding client.
    Addr util.UnresolvedAddr `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr"`
    // Non-nil means client should retry with this address.
    AlternateAddr *util.UnresolvedAddr `protobuf:"bytes,3,opt,name=alternate_addr,json=alternateAddr,proto3" json:"alternate_addr,omitempty"`
    // Node ID of the alternate address, if alternate_addr is not nil.
    AlternateNodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,4,opt,name=alternate_node_id,json=alternateNodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"alternate_node_id,omitempty"`
    // Delta of Infos which are fresh according to the map of Node info messages
    // passed with the request.
    Delta map[string]*Info `protobuf:"bytes,5,rep,name=delta,proto3" json:"delta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // Map of high water timestamps from infos originating at other
    // nodes, as seen by the responder.
    HighWaterStamps map[github_com_cockroachdb_cockroach_pkg_roachpb.NodeID]int64 `protobuf:"bytes,6,rep,name=high_water_stamps,json=highWaterStamps,proto3,castkey=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"high_water_stamps" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}

Response is returned from the Gossip.Gossip RPC. Delta will be nil in the event that Alternate is set.

func (*Response) Descriptor Uses

func (*Response) Descriptor() ([]byte, []int)

func (*Response) Marshal Uses

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo Uses

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage Uses

func (*Response) ProtoMessage()

func (*Response) Reset Uses

func (m *Response) Reset()

func (*Response) Size Uses

func (m *Response) Size() (n int)

func (*Response) String Uses

func (m *Response) String() string

func (*Response) Unmarshal Uses

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown Uses

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal Uses

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge Uses

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size Uses

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal Uses

func (m *Response) XXX_Unmarshal(b []byte) error

type ServerStatus Uses

type ServerStatus struct {
    ConnStatus []ConnStatus `protobuf:"bytes,1,rep,name=conn_status,json=connStatus,proto3" json:"conn_status"`
    MaxConns   int32        `protobuf:"varint,2,opt,name=max_conns,json=maxConns,proto3" json:"max_conns,omitempty"`
    MetricSnap `protobuf:"bytes,3,opt,name=metrics,proto3,embedded=metrics" json:"metrics"`
}

func (*ServerStatus) Descriptor Uses

func (*ServerStatus) Descriptor() ([]byte, []int)

func (*ServerStatus) Marshal Uses

func (m *ServerStatus) Marshal() (dAtA []byte, err error)

func (*ServerStatus) MarshalTo Uses

func (m *ServerStatus) MarshalTo(dAtA []byte) (int, error)

func (*ServerStatus) ProtoMessage Uses

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) Reset Uses

func (m *ServerStatus) Reset()

func (*ServerStatus) Size Uses

func (m *ServerStatus) Size() (n int)

func (ServerStatus) String Uses

func (s ServerStatus) String() string

func (*ServerStatus) Unmarshal Uses

func (m *ServerStatus) Unmarshal(dAtA []byte) error

func (*ServerStatus) XXX_DiscardUnknown Uses

func (m *ServerStatus) XXX_DiscardUnknown()

func (*ServerStatus) XXX_Marshal Uses

func (m *ServerStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerStatus) XXX_Merge Uses

func (dst *ServerStatus) XXX_Merge(src proto.Message)

func (*ServerStatus) XXX_Size Uses

func (m *ServerStatus) XXX_Size() int

func (*ServerStatus) XXX_Unmarshal Uses

func (m *ServerStatus) XXX_Unmarshal(b []byte) error

type Storage Uses

type Storage interface {
    // ReadBootstrapInfo fetches the bootstrap data from the persistent
    // store into the provided bootstrap protobuf. Returns nil or an
    // error on failure.
    ReadBootstrapInfo(*BootstrapInfo) error
    // WriteBootstrapInfo stores the provided bootstrap data to the
    // persistent store. Returns nil or an error on failure.
    WriteBootstrapInfo(*BootstrapInfo) error
}

Storage is an interface which allows the gossip instance to read and write bootstrapping data to persistent storage between instantiations.

type SystemConfigDeltaFilter Uses

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

SystemConfigDeltaFilter keeps track of SystemConfig values so that unmodified values can be filtered out from a SystemConfig update. This can prevent repeatedly unmarshaling and processing the same SystemConfig values.

A SystemConfigDeltaFilter is not safe for concurrent use by multiple goroutines.

func MakeSystemConfigDeltaFilter Uses

func MakeSystemConfigDeltaFilter(keyPrefix roachpb.Key) SystemConfigDeltaFilter

MakeSystemConfigDeltaFilter creates a new SystemConfigDeltaFilter. The filter will ignore all key-values without the specified key prefix, if one is provided.

func (*SystemConfigDeltaFilter) ForModified Uses

func (df *SystemConfigDeltaFilter) ForModified(
    newCfg *config.SystemConfig, fn func(kv roachpb.KeyValue),
)

ForModified calls the provided function for all SystemConfig kvs that were modified since the last call to this method.

Directories

PathSynopsis
resolver
simulation

Package gossip imports 35 packages (graph) and is imported by 51 packages. Updated 2019-08-09. Refresh now. Tools for package owners.