cockroach: github.com/cockroachdb/cockroach/pkg/testutils/gossiputil Index | Files

package gossiputil

import "github.com/cockroachdb/cockroach/pkg/testutils/gossiputil"

Index

Package Files

store_gossiper.go

type StoreGossiper Uses

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

StoreGossiper allows tests to push storeDescriptors into gossip and synchronize on their callbacks. There can only be one storeGossiper used per gossip instance.

func NewStoreGossiper Uses

func NewStoreGossiper(g *gossip.Gossip) *StoreGossiper

NewStoreGossiper creates a store gossiper for use by tests. It adds the callback to gossip.

func (*StoreGossiper) GossipStores Uses

func (sg *StoreGossiper) GossipStores(storeDescs []*roachpb.StoreDescriptor, t *testing.T)

GossipStores queues up a list of stores to gossip and blocks until each one is gossiped before returning.

func (*StoreGossiper) GossipWithFunction Uses

func (sg *StoreGossiper) GossipWithFunction(storeIDs []roachpb.StoreID, gossipFn func())

GossipWithFunction calls gossipFn and blocks until gossip callbacks have fired on each of the stores specified by storeIDs.

Package gossiputil imports 5 packages (graph). Updated 2019-06-28. Refresh now. Tools for package owners.