go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/discovery Index | Files

package discovery

import "gopkg.in/src-d/go-vitess.v1/vt/discovery"

Package discovery provides a way to discover all tablets e.g. within a specific shard and monitor their current health.

Use the HealthCheck object to query for tablets and their health.

For an example how to use the HealthCheck object, see worker/topo_utils.go.

Tablets have to be manually added to the HealthCheck using AddTablet(). Alternatively, use a Watcher implementation which will constantly watch a source (e.g. the topology) and add and remove tablets as they are added or removed from the source. For a Watcher example have a look at NewShardReplicationWatcher().

Each HealthCheck has a HealthCheckStatsListener that will receive notification of when tablets go up and down. TabletStatsCache is one implementation, that caches the known tablets and the healthy ones per keyspace/shard/tabletType.

Internally, the HealthCheck module is connected to each tablet and has a streaming RPC (StreamHealth) open to receive periodic health infos.

Index

Package Files

fake_healthcheck.go healthcheck.go replicationlag.go tablet_stats_cache.go tablet_stats_cache_wait.go topology_watcher.go utils.go

Constants

const (
    DefaultHealthCheckRetryDelay = 5 * time.Second
    DefaultHealthCheckTimeout    = 1 * time.Minute

    DefaultTopoReadConcurrency int = 5

    DefaultTopologyWatcherRefreshInterval = 1 * time.Minute

    HealthCheckTemplate = "" /* 653 byte string literal not displayed */

)

See the documentation for NewHealthCheck below for an explanation of these parameters.

func IsReplicationLagHigh Uses

func IsReplicationLagHigh(tabletStats *TabletStats) bool

IsReplicationLagHigh verifies that the given TabletStats refers to a tablet with high replication lag, i.e. higher than the configured discovery_low_replication_lag flag.

func IsReplicationLagVeryHigh Uses

func IsReplicationLagVeryHigh(tabletStats *TabletStats) bool

IsReplicationLagVeryHigh verifies that the given TabletStats refers to a tablet with very high replication lag, i.e. higher than the configured discovery_high_replication_lag_minimum_serving flag.

func ParseTabletURLTemplateFromFlag Uses

func ParseTabletURLTemplateFromFlag()

ParseTabletURLTemplateFromFlag loads or reloads the URL template.

func TabletToMapKey Uses

func TabletToMapKey(tablet *topodatapb.Tablet) string

TabletToMapKey creates a key to the map from tablet's host and ports. It should only be used in discovery and related module.

func TrivialStatsUpdate Uses

func TrivialStatsUpdate(o, n *TabletStats) bool

TrivialStatsUpdate returns true iff the old and new TabletStats haven't changed enough to warrant re-calling FilterByReplicationLag.

type FakeHealthCheck Uses

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

FakeHealthCheck implements discovery.HealthCheck.

func NewFakeHealthCheck Uses

func NewFakeHealthCheck() *FakeHealthCheck

NewFakeHealthCheck returns the fake healthcheck object.

func (*FakeHealthCheck) AddFakeTablet Uses

func (fhc *FakeHealthCheck) AddFakeTablet(cell, host string, port int32, keyspace, shard string, tabletType topodatapb.TabletType, serving bool, reparentTS int64, err error, connFactory func(*topodatapb.Tablet) queryservice.QueryService) queryservice.QueryService

AddFakeTablet inserts a fake entry into FakeHealthCheck. The Tablet can be talked to using the provided connection. The Listener is called, as if AddTablet had been called. For flexibility the connection is created via a connFactory callback

func (*FakeHealthCheck) AddTablet Uses

func (fhc *FakeHealthCheck) AddTablet(tablet *topodatapb.Tablet, name string)

AddTablet adds the tablet and calls the listener.

func (*FakeHealthCheck) AddTestTablet Uses

func (fhc *FakeHealthCheck) AddTestTablet(cell, host string, port int32, keyspace, shard string, tabletType topodatapb.TabletType, serving bool, reparentTS int64, err error) *sandboxconn.SandboxConn

AddTestTablet adds a fake tablet for tests using the SandboxConn and returns the fake connection

func (*FakeHealthCheck) CacheStatus Uses

func (fhc *FakeHealthCheck) CacheStatus() TabletsCacheStatusList

CacheStatus returns the status for each tablet

func (*FakeHealthCheck) Close Uses

func (fhc *FakeHealthCheck) Close() error

Close is not implemented.

func (*FakeHealthCheck) GetAllTablets Uses

func (fhc *FakeHealthCheck) GetAllTablets() map[string]*topodatapb.Tablet

GetAllTablets returns all the tablets we have.

func (*FakeHealthCheck) GetConnection Uses

func (fhc *FakeHealthCheck) GetConnection(key string) queryservice.QueryService

GetConnection returns the TabletConn of the given tablet.

func (*FakeHealthCheck) RegisterStats Uses

func (fhc *FakeHealthCheck) RegisterStats()

RegisterStats is not implemented.

func (*FakeHealthCheck) RemoveTablet Uses

func (fhc *FakeHealthCheck) RemoveTablet(tablet *topodatapb.Tablet)

RemoveTablet removes the tablet.

func (*FakeHealthCheck) ReplaceTablet Uses

func (fhc *FakeHealthCheck) ReplaceTablet(old, new *topodatapb.Tablet, name string)

ReplaceTablet removes the old tablet and adds the new.

func (*FakeHealthCheck) Reset Uses

func (fhc *FakeHealthCheck) Reset()

Reset cleans up the internal state.

func (*FakeHealthCheck) SetListener Uses

func (fhc *FakeHealthCheck) SetListener(listener HealthCheckStatsListener, sendDownEvents bool)

SetListener is not implemented.

func (*FakeHealthCheck) WaitForInitialStatsUpdates Uses

func (fhc *FakeHealthCheck) WaitForInitialStatsUpdates()

WaitForInitialStatsUpdates is not implemented.

type FilterByShard Uses

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

FilterByShard is a TabletRecorder filter that filters tablets by keyspace/shard.

func NewFilterByShard Uses

func NewFilterByShard(tr TabletRecorder, filters []string) (*FilterByShard, error)

NewFilterByShard creates a new FilterByShard on top of an existing TabletRecorder. Each filter is a keyspace|shard entry, where shard can either be a shard name, or a keyrange. All tablets that match at least one keyspace|shard tuple will be forwarded to the underlying TabletRecorder.

func (*FilterByShard) AddTablet Uses

func (fbs *FilterByShard) AddTablet(tablet *topodatapb.Tablet, name string)

AddTablet is part of the TabletRecorder interface.

func (*FilterByShard) RemoveTablet Uses

func (fbs *FilterByShard) RemoveTablet(tablet *topodatapb.Tablet)

RemoveTablet is part of the TabletRecorder interface.

func (*FilterByShard) ReplaceTablet Uses

func (fbs *FilterByShard) ReplaceTablet(old, new *topodatapb.Tablet, name string)

ReplaceTablet is part of the TabletRecorder interface.

type HealthCheck Uses

type HealthCheck interface {
    // TabletRecorder interface adds AddTablet and RemoveTablet methods.
    // AddTablet adds the tablet, and starts health check on it.
    // RemoveTablet removes the tablet, and stops its StreamHealth RPC.
    TabletRecorder

    // RegisterStats registers the connection counts and checksum stats.
    // It can only be called on one Healthcheck object per process.
    RegisterStats()
    // SetListener sets the listener for healthcheck
    // updates. sendDownEvents is used when a tablet changes type
    // (from replica to master for instance). If the listener
    // wants two events (Up=false on old type, Up=True on new
    // type), sendDownEvents should be set. Otherwise, the
    // healthcheck will only send one event (Up=true on new type).
    //
    // Note that the default implementation requires to set the
    // listener before any tablets are added to the healthcheck.
    SetListener(listener HealthCheckStatsListener, sendDownEvents bool)
    // WaitForInitialStatsUpdates waits until all tablets added via
    // AddTablet() call were propagated to the listener via corresponding
    // StatsUpdate() calls. Note that code path from AddTablet() to
    // corresponding StatsUpdate() is asynchronous but not cancelable, thus
    // this function is also non-cancelable and can't return error. Also
    // note that all AddTablet() calls should happen before calling this
    // method. WaitForInitialStatsUpdates won't wait for StatsUpdate() calls
    // corresponding to AddTablet() calls made during its execution.
    WaitForInitialStatsUpdates()
    // GetConnection returns the TabletConn of the given tablet.
    GetConnection(key string) queryservice.QueryService
    // CacheStatus returns a displayable version of the cache.
    CacheStatus() TabletsCacheStatusList
    // Close stops the healthcheck.
    Close() error
}

HealthCheck defines the interface of health checking module. The goal of this object is to maintain a StreamHealth RPC to a lot of tablets. Tablets are added / removed by calling the AddTablet / RemoveTablet methods (other discovery module objects can for instance watch the topology and call these).

Updates to the health of all registered tablet can be watched by registering a listener. To get the underlying "TabletConn" object which is used for each tablet, use the "GetConnection()" method below and pass in the Key string which is also sent to the listener in each update (as it is part of TabletStats).

func NewDefaultHealthCheck Uses

func NewDefaultHealthCheck() HealthCheck

NewDefaultHealthCheck creates a new HealthCheck object with a default configuration.

func NewHealthCheck Uses

func NewHealthCheck(retryDelay, healthCheckTimeout time.Duration) HealthCheck

NewHealthCheck creates a new HealthCheck object. Parameters: retryDelay.

The duration to wait before retrying to connect (e.g. after a failed connection
attempt).

healthCheckTimeout.

The duration for which we consider a health check response to be 'fresh'. If we don't get
a health check response from a tablet for more than this duration, we consider the tablet
not healthy.

type HealthCheckImpl Uses

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

HealthCheckImpl performs health checking and notifies downstream components about any changes. It contains a map of tabletHealth objects, each of which stores the health information for a tablet. A checkConn goroutine is spawned for each tabletHealth, which is responsible for keeping that tabletHealth up-to-date. This is done through callbacks to updateHealth. If checkConn terminates for any reason, it updates tabletHealth.Up as false. If a tabletHealth gets removed from the map, its cancelFunc gets called, which ensures that the associated checkConn goroutine eventually terminates.

func (*HealthCheckImpl) AddTablet Uses

func (hc *HealthCheckImpl) AddTablet(tablet *topodatapb.Tablet, name string)

AddTablet adds the tablet, and starts health check. It does not block on making connection. name is an optional tag for the tablet, e.g. an alternative address.

func (*HealthCheckImpl) CacheStatus Uses

func (hc *HealthCheckImpl) CacheStatus() TabletsCacheStatusList

CacheStatus returns a displayable version of the cache.

func (*HealthCheckImpl) Close Uses

func (hc *HealthCheckImpl) Close() error

Close stops the healthcheck. After Close() returned, it's guaranteed that the listener isn't currently executing and won't be called again.

func (*HealthCheckImpl) GetConnection Uses

func (hc *HealthCheckImpl) GetConnection(key string) queryservice.QueryService

GetConnection returns the TabletConn of the given tablet.

func (*HealthCheckImpl) RegisterStats Uses

func (hc *HealthCheckImpl) RegisterStats()

RegisterStats registers the connection counts stats

func (*HealthCheckImpl) RemoveTablet Uses

func (hc *HealthCheckImpl) RemoveTablet(tablet *topodatapb.Tablet)

RemoveTablet removes the tablet, and stops the health check. It does not block.

func (*HealthCheckImpl) ReplaceTablet Uses

func (hc *HealthCheckImpl) ReplaceTablet(old, new *topodatapb.Tablet, name string)

ReplaceTablet removes the old tablet and adds the new tablet.

func (*HealthCheckImpl) ServeHTTP Uses

func (hc *HealthCheckImpl) ServeHTTP(w http.ResponseWriter, _ *http.Request)

ServeHTTP is part of the http.Handler interface. It renders the current state of the discovery gateway tablet cache into json.

func (*HealthCheckImpl) SetListener Uses

func (hc *HealthCheckImpl) SetListener(listener HealthCheckStatsListener, sendDownEvents bool)

SetListener sets the listener for healthcheck updates. It must be called after NewHealthCheck and before any tablets are added (either through AddTablet or through a Watcher).

func (*HealthCheckImpl) WaitForInitialStatsUpdates Uses

func (hc *HealthCheckImpl) WaitForInitialStatsUpdates()

WaitForInitialStatsUpdates waits until all tablets added via AddTablet() call were propagated to downstream via corresponding StatsUpdate() calls.

type HealthCheckStatsListener Uses

type HealthCheckStatsListener interface {
    // StatsUpdate is called when:
    // - a new tablet is known to the HealthCheck, and its first
    //   streaming healthcheck is returned. (then ts.Up is true).
    // - a tablet is removed from the list of tablets we watch
    //   (then ts.Up is false).
    // - a tablet dynamically changes its type. When registering the
    //   listener, if sendDownEvents is true, two events are generated
    //   (ts.Up false on the old type, ts.Up true on the new type).
    //   If it is false, only one event is sent (ts.Up true on the new
    //   type).
    StatsUpdate(*TabletStats)
}

HealthCheckStatsListener is the listener to receive health check stats update.

type TabletRecorder Uses

type TabletRecorder interface {
    // AddTablet adds the tablet.
    // Name is an alternate name, like an address.
    AddTablet(tablet *topodatapb.Tablet, name string)

    // RemoveTablet removes the tablet.
    RemoveTablet(tablet *topodatapb.Tablet)

    // ReplaceTablet does an AddTablet and RemoveTablet in one call, effectively replacing the old tablet with the new.
    ReplaceTablet(old, new *topodatapb.Tablet, name string)
}

TabletRecorder is the part of the HealthCheck interface that can add or remove tablets. We define it as a sub-interface here so we can add filters on tablets if needed.

type TabletStats Uses

type TabletStats struct {
    // Key uniquely identifies that serving tablet. It is computed
    // from the Tablet's record Hostname and PortMap. If a tablet
    // is restarted on different ports, its Key will be different.
    // Key is computed using the TabletToMapKey method below.
    // key can be used in GetConnection().
    Key string
    // Tablet is the tablet object that was sent to HealthCheck.AddTablet.
    Tablet *topodatapb.Tablet
    // Name is an optional tag (e.g. alternative address) for the
    // tablet.  It is supposed to represent the tablet as a task,
    // not as a process.  For instance, it can be a
    // cell+keyspace+shard+tabletType+taskIndex value.
    Name string
    // Target is the current target as returned by the streaming
    // StreamHealth RPC.
    Target *querypb.Target
    // Up describes whether the tablet is added or removed.
    Up  bool
    // Serving describes if the tablet can be serving traffic.
    Serving bool
    // TabletExternallyReparentedTimestamp is the last timestamp
    // that this tablet was either elected the master, or received
    // a TabletExternallyReparented event. It is set to 0 if the
    // tablet doesn't think it's a master.
    TabletExternallyReparentedTimestamp int64
    // Stats is the current health status, as received by the
    // StreamHealth RPC (replication lag, ...).
    Stats *querypb.RealtimeStats
    // LastError is the error we last saw when trying to get the
    // tablet's healthcheck.
    LastError error
}

TabletStats is returned when getting the set of tablets.

func FilterByReplicationLag Uses

func FilterByReplicationLag(tabletStatsList []*TabletStats) []*TabletStats

FilterByReplicationLag filters the list of TabletStats by TabletStats.Stats.SecondsBehindMaster. The algorithm (TabletStats that is non-serving or has error is ignored): - Return the list if there is 0 or 1 tablet. - Return the list if all tablets have <=30s lag. - Filter by replication lag: for each tablet, if the mean value without it is more than 0.7 of the mean value across all tablets, it is valid. - Make sure we return at least minNumTablets tablets (if there are enough one with only low replication lag). - If one tablet is removed, run above steps again in case there are two tablets with high replication lag. (It should cover most cases.) For example, lags of (5s, 10s, 15s, 120s) return the first three; lags of (30m, 35m, 40m, 45m) return all.

One thing to know about this code: vttablet also has a couple flags that impact the logic here: * unhealthy_threshold: if replication lag is higher than this, a tablet will be reported as unhealhty.

The default for this is 2h, same as the discovery_high_replication_lag_minimum_serving here.

* degraded_threshold: this is only used by vttablet for display. It should match

discovery_low_replication_lag here, so the vttablet status display matches what vtgate will do of it.

func RemoveUnhealthyTablets Uses

func RemoveUnhealthyTablets(tabletStatsList []TabletStats) []TabletStats

RemoveUnhealthyTablets filters all unhealthy tablets out. NOTE: Non-serving tablets are considered healthy.

func (*TabletStats) Copy Uses

func (e *TabletStats) Copy() *TabletStats

Copy produces a copy of TabletStats.

func (*TabletStats) DeepEqual Uses

func (e *TabletStats) DeepEqual(f *TabletStats) bool

DeepEqual compares two TabletStats. Since we include protos, we need to use proto.Equal on these.

func (TabletStats) GetHostNameLevel Uses

func (e TabletStats) GetHostNameLevel(level int) string

GetHostNameLevel returns the specified hostname level. If the level does not exist it will pick the closest level. This seems unused but can be utilized by certain url formatting templates. See getTabletDebugURL for more details.

func (TabletStats) GetTabletHostPort Uses

func (e TabletStats) GetTabletHostPort() string

GetTabletHostPort formats a tablet host port address.

func (*TabletStats) String Uses

func (e *TabletStats) String() string

String is defined because we want to print a []*TabletStats array nicely.

type TabletStatsCache Uses

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

TabletStatsCache is a HealthCheckStatsListener that keeps both the current list of available TabletStats, and a serving list: - for master tablets, only the current master is kept. - for non-master tablets, we filter the list using FilterByReplicationLag. It keeps entries for all tablets in the cell(s) it's configured to serve for, and for the master independently of which cell it's in. Note the healthy tablet computation is done when we receive a tablet update only, not at serving time. Also note the cache may not have the last entry received by the tablet. For instance, if a tablet was healthy, and is still healthy, we do not keep its new update.

func NewTabletStatsCache Uses

func NewTabletStatsCache(hc HealthCheck, ts *topo.Server, cell string) *TabletStatsCache

NewTabletStatsCache creates a TabletStatsCache, and registers it as HealthCheckStatsListener of the provided healthcheck. Note we do the registration in this code to guarantee we call SetListener with sendDownEvents=true, as we need these events to maintain the integrity of our cache.

func NewTabletStatsCacheDoNotSetListener Uses

func NewTabletStatsCacheDoNotSetListener(ts *topo.Server, cell string) *TabletStatsCache

NewTabletStatsCacheDoNotSetListener is identical to NewTabletStatsCache but does not automatically set the returned object as listener for "hc". Instead, it's up to the caller to ensure that TabletStatsCache.StatsUpdate() gets called properly. This is useful for chaining multiple listeners. When the caller sets its own listener on "hc", they must make sure that they set the parameter "sendDownEvents" to "true" or this cache won't properly remove tablets whose tablet type changes.

func (*TabletStatsCache) GetAggregateStats Uses

func (tc *TabletStatsCache) GetAggregateStats(target *querypb.Target) (*querypb.AggregateStats, error)

GetAggregateStats is part of the TargetStatsListener interface.

func (*TabletStatsCache) GetHealthyTabletStats Uses

func (tc *TabletStatsCache) GetHealthyTabletStats(keyspace, shard string, tabletType topodatapb.TabletType) []TabletStats

GetHealthyTabletStats returns only the healthy targets. The returned array is owned by the caller. For TabletType_MASTER, this will only return at most one entry, the most recent tablet of type master.

func (*TabletStatsCache) GetMasterCell Uses

func (tc *TabletStatsCache) GetMasterCell(keyspace, shard string) (cell string, err error)

GetMasterCell is part of the TargetStatsListener interface.

func (*TabletStatsCache) GetTabletStats Uses

func (tc *TabletStatsCache) GetTabletStats(keyspace, shard string, tabletType topodatapb.TabletType) []TabletStats

GetTabletStats returns the full list of available targets. The returned array is owned by the caller.

func (*TabletStatsCache) ResetForTesting Uses

func (tc *TabletStatsCache) ResetForTesting()

ResetForTesting is for use in tests only.

func (*TabletStatsCache) StatsUpdate Uses

func (tc *TabletStatsCache) StatsUpdate(ts *TabletStats)

StatsUpdate is part of the HealthCheckStatsListener interface.

func (*TabletStatsCache) WaitForAllServingTablets Uses

func (tc *TabletStatsCache) WaitForAllServingTablets(ctx context.Context, targets []*querypb.Target) error

WaitForAllServingTablets waits for at least one healthy serving tablet in each given target before returning. It will return ctx.Err() if the context is canceled. It will return an error if it can't read the necessary topology records.

func (*TabletStatsCache) WaitForAnyTablet Uses

func (tc *TabletStatsCache) WaitForAnyTablet(ctx context.Context, cell, keyspace, shard string, tabletTypes []topodatapb.TabletType) error

WaitForAnyTablet waits for a single tablet of any of the types. It doesn't have to be serving.

func (*TabletStatsCache) WaitForTablets Uses

func (tc *TabletStatsCache) WaitForTablets(ctx context.Context, cell, keyspace, shard string, tabletType topodatapb.TabletType) error

WaitForTablets waits for at least one tablet in the given cell / keyspace / shard / tablet type before returning. The tablets do not have to be healthy. It will return ctx.Err() if the context is canceled.

type TabletStatsList Uses

type TabletStatsList []*TabletStats

TabletStatsList is used for sorting.

func (TabletStatsList) Len Uses

func (tsl TabletStatsList) Len() int

Len is part of sort.Interface.

func (TabletStatsList) Less Uses

func (tsl TabletStatsList) Less(i, j int) bool

Less is part of sort.Interface

func (TabletStatsList) Swap Uses

func (tsl TabletStatsList) Swap(i, j int)

Swap is part of sort.Interface

type TabletsCacheStatus Uses

type TabletsCacheStatus struct {
    Cell         string
    Target       *querypb.Target
    TabletsStats TabletStatsList
}

TabletsCacheStatus is the current tablets for a cell/target.

func (*TabletsCacheStatus) StatusAsHTML Uses

func (tcs *TabletsCacheStatus) StatusAsHTML() template.HTML

StatusAsHTML returns an HTML version of the status.

type TabletsCacheStatusList Uses

type TabletsCacheStatusList []*TabletsCacheStatus

TabletsCacheStatusList is used for sorting.

func (TabletsCacheStatusList) Len Uses

func (tcsl TabletsCacheStatusList) Len() int

Len is part of sort.Interface.

func (TabletsCacheStatusList) Less Uses

func (tcsl TabletsCacheStatusList) Less(i, j int) bool

Less is part of sort.Interface

func (TabletsCacheStatusList) Swap Uses

func (tcsl TabletsCacheStatusList) Swap(i, j int)

Swap is part of sort.Interface

type TopologyWatcher Uses

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

TopologyWatcher polls tablet from a configurable set of tablets periodically. When tablets are added / removed, it calls the TabletRecorder AddTablet / RemoveTablet interface appropriately.

func NewCellTabletsWatcher Uses

func NewCellTabletsWatcher(ctx context.Context, topoServer *topo.Server, tr TabletRecorder, cell string, refreshInterval time.Duration, refreshKnownTablets bool, topoReadConcurrency int) *TopologyWatcher

NewCellTabletsWatcher returns a TopologyWatcher that monitors all the tablets in a cell, and starts refreshing.

func NewShardReplicationWatcher Uses

func NewShardReplicationWatcher(ctx context.Context, topoServer *topo.Server, tr TabletRecorder, cell, keyspace, shard string, refreshInterval time.Duration, topoReadConcurrency int) *TopologyWatcher

NewShardReplicationWatcher returns a TopologyWatcher that monitors the tablets in a cell/keyspace/shard, and starts refreshing.

func NewTopologyWatcher Uses

func NewTopologyWatcher(ctx context.Context, topoServer *topo.Server, tr TabletRecorder, cell string, refreshInterval time.Duration, refreshKnownTablets bool, topoReadConcurrency int, getTablets func(tw *TopologyWatcher) ([]*topodatapb.TabletAlias, error)) *TopologyWatcher

NewTopologyWatcher returns a TopologyWatcher that monitors all the tablets in a cell, and starts refreshing.

func (*TopologyWatcher) RefreshLag Uses

func (tw *TopologyWatcher) RefreshLag() time.Duration

RefreshLag returns the time since the last refresh

func (*TopologyWatcher) Stop Uses

func (tw *TopologyWatcher) Stop()

Stop stops the watcher. It does not clean up the tablets added to TabletRecorder.

func (*TopologyWatcher) TopoChecksum Uses

func (tw *TopologyWatcher) TopoChecksum() uint32

TopoChecksum returns the checksum of the current state of the topo

func (*TopologyWatcher) WaitForInitialTopology Uses

func (tw *TopologyWatcher) WaitForInitialTopology() error

WaitForInitialTopology waits until the watcher reads all of the topology data for the first time and transfers the information to TabletRecorder via its AddTablet() method.

Package discovery imports 30 packages (graph) and is imported by 22 packages. Updated 2019-06-13. Refresh now. Tools for package owners.