package
0.0.0-20180712231451-df570b367423
Repository: https://github.com/influx6/faux.git
Documentation: pkg.go.dev
# Functions
Append returns a new Pair with the giving key and with the provded Pair set as it's previous link.
Apply runs all giving func(*Entry) functions provided on the provided Entry.
BatchConsumer returns a new instance of a batchConsumer.
Case returns a Processor object with the provided Augmenters and Metrics implemement objects for receiving metric Entries, where entries are filtered out based on a provided function.
Collect returns a Collector which executes provided function when called by Metric to run.
DoWith returns a Metrics object where all entries are applied to the provided function.
Error returns a entry where the message is the provided error.Error() value and the error is added as a key-value within the Entry fields.
Errorf returns a entry where the message is the provided error.Error() value produced from the message and its provided values and the error is added as a key-value within the Entry fields.
FilterLevel will return a metrics where all Entry will be filtered by their Entry.Level if the level giving is greater or equal to the provided, then it will be received by the metrics subscribers.
GetLevel returns Level value for the giving string.
Info returns an Entry with the level set to Info.
Message returns a new Entry with the provided Level and message used.
New returns a Metrics object with the provided Augmenters and Metrics implemement objects for receiving metric Entries.
NewPair returns a a key-value pair chain for setting fields.
NewTrace returns a Trace object which is used to track the execution and stack details of a given trace call.
NewTraceWithCallDepth returns a Trace object which is used to track the execution and stack details of a given trace call.
Partial returns a new func(*Entry) which will always apply provided func(*Entry) to all provided Entry.
RedAlert returns an Entry with the level set to RedAlertLvl.
Switch returns a new instance of a SwitchMaster.
Tags returns an Entry with the tags value set to ts.
Type returns an Entry with the type value set to t.
With returns a Entry set to the LogLevel of the previous and adds the giving key-value pair to the entry.
WithFields adds all field key-value pair into associated Entry returning the Entry.
WithFilter returns a Entry and set the Filter to the provided value.
WithID returns a Entry and set the ID to the provided value.
WithMessage returns a new Entry with the provided Level and message used.
WithTimelapse returns a Timelapse with associated field and message.
WithTrace returns itself after setting the giving trace value has the method trace for the giving Entry.
YellowAlert returns an Entry with the level set to YellowAlertLvl.
# Constants
Error occured with some code due to normal opperation or odd behaviour (not critical).
Information for view about code operation (replaces Debug, Notice, Trace).
Immediately notify everyone by mail level, because this is bad.
Immediately notify everyone but we can wait to tomorrow.
# Structs
Entry represent a giving record of data at a giving period of time.
Pair defines a struct for storing a linked pair of key and values.
Timelapse defines a message attached with a giving time value.
Trace defines a structure which contains the stack, start and endtime on a given from a trace call to trace a given call with stack details and execution time.
# Interfaces
Collector defines an interface which exposes a single method to collect internal data which is then returned as an Entry.
ConditionalProcessors defines a Processor which first validate it's ability to process a giving Entry.
MetricConsumer exposes a interface which allows the consumption of Entries into a underline system, which can be started through it's run method.
Metrics defines an interface with a single method for receiving new Entry objects.
Processors implements a single method to process a Entry.
# Type aliases
CommitFunction defines a function type which is used to process a batch of Entry.
DoFn defines a function type which takes a giving Entry.
EntryEmitter defines a type which returns a entry when runned.
Field represents a giving map of values associated with a giving field value.
FilterFn defines a function type which takes a giving Entry returning a bool to indicate filtering state.
Level defines a int type which represent the a giving level of entry for a giving entry.