tensor¶
tensor.interfaces¶
tensor.objects¶
- class tensor.objects.Event(state, service, description, metric, ttl, tags=, []hostname=None)[source]¶
Bases: object
Tensor Event object
All sources pass these to the queue, which form a proxy object to create protobuf Event objects
Arguments:
State: Some sort of string < 255 chars describing the state Service: The service name for this event Description: A description for the event, ie. “My house is on fire!” Metric: int or float metric for this event Keyword arguments:
Tags: List of tag strings Hostname: Hostname for the event (defaults to system fqdn)
- class tensor.objects.Output(config, tensor)[source]¶
Bases: object
Output parent class
Outputs can inherit this object which provides a construct for a working output
Arguments:
Config: Dictionary config for this queue (usually read from the yaml configuration) Tensor: A TensorService object for interacting with the queue manager
- class tensor.objects.Source(config, queueBack, tensor)[source]¶
Bases: object
Source parent class
Sources can inherit this object which provides a number of utility methods.
Arguments:
Config: Dictionary config for this queue (usually read from the yaml configuration) QueueBack: A callback method to recieve a list of Event objects Tensor: A TensorService object for interacting with the queue manager
tensor.service¶
tensor.utils¶
- class tensor.utils.BodyReceiver(finished)[source]¶
Bases: twisted.internet.protocol.Protocol
Simple buffering consumer for body objects