status

package
Version: v0.0.0-...-240891c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package status defines the data types of cluster-wide and per-node status responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct{}

A Cluster that contains nodes.

type Node

type Node struct{}

Node represents an individual node within the cluster.

type NodeList

type NodeList struct {
	Nodes []NodeSummary `json:"nodes"`
}

NodeList contains a slice of summaries for each Node.

type NodeStatusMonitor

type NodeStatusMonitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NodeStatusMonitor monitors the status of a server node. Status information is collected from event feeds provided by lower level components.

This structure contains collections of other StatusMonitor types which monitor interesting subsets of data on the node. NodeStatusMonitor is responsible for passing event feed data to these subset structures for accumulation.

func NewNodeStatusMonitor

func NewNodeStatusMonitor() *NodeStatusMonitor

NewNodeStatusMonitor initializes a new NodeStatusMonitor instance.

func (*NodeStatusMonitor) GetStoreMonitor

func (nsm *NodeStatusMonitor) GetStoreMonitor(id proto.StoreID) *StoreStatusMonitor

GetStoreMonitor is a helper method which retrieves the StoreStatusMonitor for the given StoreID, creating it if it does not already exist.

func (*NodeStatusMonitor) OnAddRange

func (nsm *NodeStatusMonitor) OnAddRange(event *storage.AddRangeEvent)

OnAddRange receives AddRangeEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnBeginScanRanges

func (nsm *NodeStatusMonitor) OnBeginScanRanges(event *storage.BeginScanRangesEvent)

OnBeginScanRanges receives BeginScanRangesEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnEndScanRanges

func (nsm *NodeStatusMonitor) OnEndScanRanges(event *storage.EndScanRangesEvent)

OnEndScanRanges receives EndScanRangesEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnMergeRange

func (nsm *NodeStatusMonitor) OnMergeRange(event *storage.MergeRangeEvent)

OnMergeRange receives MergeRangeEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnRemoveRange

func (nsm *NodeStatusMonitor) OnRemoveRange(event *storage.RemoveRangeEvent)

OnRemoveRange receives RemoveRangeEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnSplitRange

func (nsm *NodeStatusMonitor) OnSplitRange(event *storage.SplitRangeEvent)

OnSplitRange receives SplitRangeEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnStartStore

func (nsm *NodeStatusMonitor) OnStartStore(event *storage.StartStoreEvent)

OnStartStore receives StartStoreEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) OnUpdateRange

func (nsm *NodeStatusMonitor) OnUpdateRange(event *storage.UpdateRangeEvent)

OnUpdateRange receives UpdateRangeEvents retrieved from an storage event subscription. This method is part of the implementation of store.StoreEventListener.

func (*NodeStatusMonitor) StartMonitorFeed

func (nsm *NodeStatusMonitor) StartMonitorFeed(feed *util.Feed)

StartMonitorFeed starts a goroutine which processes events published to the supplied Subscription. The goroutine will continue running until the Subscription's Events feed is closed.

func (*NodeStatusMonitor) VisitStoreMonitors

func (nsm *NodeStatusMonitor) VisitStoreMonitors(visitor func(*StoreStatusMonitor))

VisitStoreMonitors calls the supplied visitor function with every StoreStatusMonitor currently in this monitor's collection. A lock is taken on each StoreStatusMonitor before it is passed to the visitor function.

type NodeStatusRecorder

type NodeStatusRecorder struct {
	*NodeStatusMonitor
	// contains filtered or unexported fields
}

NodeStatusRecorder is used to periodically persist the status of a node as a set of time series data.

func NewNodeStatusRecorder

func NewNodeStatusRecorder(monitor *NodeStatusMonitor, clock *hlc.Clock) *NodeStatusRecorder

NewNodeStatusRecorder instantiates a recorder for the supplied monitor.

func (*NodeStatusRecorder) GetTimeSeriesData

func (nsr *NodeStatusRecorder) GetTimeSeriesData() []proto.TimeSeriesData

GetTimeSeriesData returns a slice of interesting TimeSeriesData from the encapsulated NodeStatusMonitor.

type NodeSummary

type NodeSummary struct {
	ID   string `json:"id"`
	Addr string `json:"addr"`
}

A NodeSummary contains a summary for a particular node.

type StoreStatusMonitor

type StoreStatusMonitor struct {
	ID proto.StoreID
	// contains filtered or unexported fields
}

StoreStatusMonitor monitors the status of a single store on the server. Status information is collected from event feeds provided by lower level components.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL