Documentation ¶
Index ¶
- Constants
- func CastBucketToBytes(buckets map[string]interface{}, key string) (data []byte, err error)
- func GetColoredText(text string, textColor string) string
- type Comparator
- type CompareFunc
- type Consolidator
- type Context
- type Dispatcher
- type FetchFrequency
- type Fetcher
- type Instance
- type InstanceID
- type Logger
- type TranspileFunc
- type Transpiler
Constants ¶
View Source
const ( //SubrPrefix = "[SUBR]" InfoPrefix = "INFO" WarningPrefix = "WARN" ErrorPrefix = "ERRR" )
View Source
const ( Faster = FetchFrequency(20 * time.Second) Fast = FetchFrequency(1 * time.Minute) Normal = FetchFrequency(5 * time.Minute) Slow = FetchFrequency(20 * time.Minute) Slower = FetchFrequency(1 * time.Hour) )
Variables ¶
This section is empty.
Functions ¶
func CastBucketToBytes ¶
func GetColoredText ¶
Types ¶
type Comparator ¶
type CompareFunc ¶
type Consolidator ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func Default ¶
func Default() *Dispatcher
func New ¶
func New() *Dispatcher
func (*Dispatcher) AttachInstance ¶
func (d *Dispatcher) AttachInstance(id InstanceID, instance *Instance) error
func (*Dispatcher) GetInstance ¶
func (d *Dispatcher) GetInstance(id InstanceID) *Instance
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run()
type FetchFrequency ¶
type Instance ¶
type Instance struct { FetchFrequency LastBuckets map[string]interface{} // contains filtered or unexported fields }
func NewInstance ¶
func NewInstance(frequency FetchFrequency) *Instance
func (*Instance) SetComparator ¶
func (i *Instance) SetComparator(comparator Comparator) *Instance
func (*Instance) UseConsolidator ¶
func (i *Instance) UseConsolidator(consolidator Consolidator) *Instance
func (*Instance) UseFetcher ¶
func (*Instance) UseTranspiler ¶
func (i *Instance) UseTranspiler(transpiler Transpiler) *Instance
type InstanceID ¶
type InstanceID string
type Logger ¶
type Logger struct {
InstanceID
}
type TranspileFunc ¶
type FetchFunc func(c *Context) error
type Transpiler ¶
Click to show internal directories.
Click to hide internal directories.