Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecvMetricValues ¶
func RecvMetricValues(sourceMetrics []*cmodel.MetricValue, reply *cmodel.TransferResponse, from string) error
process new metric values
Types ¶
type RelayDelegatee ¶
type RelayDelegatee interface { Accept(*cmodel.MetaData) bool RelayToQueue() int Clone() RelayDelegatee }
This interface used by "RelayStation"
type RelayStation ¶
type RelayStation struct { // All of the metrics would be fed into "Accept(*MetaData)" in this bucket Any []RelayDelegatee // If a metric fit("Accept(*MetaData)" returns "true"), it would be consumed Exclusive []RelayDelegatee // All of the metrics which are not consumed by "Exclusive" bucket, would be sent to this bucket Otherwise []RelayDelegatee }
This object handles the input metric and try to dispatch metric to corresponding RelayDelegatees.
func (*RelayStation) Dispatch ¶
func (r *RelayStation) Dispatch(metaMetric *cmodel.MetaData)
func (*RelayStation) RelayToQueue ¶
func (r *RelayStation) RelayToQueue()
type RelayStationFactory ¶
type RelayStationFactory struct {
// contains filtered or unexported fields
}
This factory is used to build independent instance of "*RelayStation", which is "CLONED" by pre-defined one.
var DefaultRelayStationFactory *RelayStationFactory
func NewRelayFactoryByGlobalConfig ¶
func NewRelayFactoryByGlobalConfig(config *g.GlobalConfig) *RelayStationFactory
Builds "*RelayStationFactory" from instance of "*g.GlobalConfig"
func (*RelayStationFactory) Build ¶
func (f *RelayStationFactory) Build() *RelayStation
Click to show internal directories.
Click to hide internal directories.