Skip to content

Commit

Permalink
Some sorting.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Jul 24, 2017
1 parent 58878de commit f6d72ff
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
4 changes: 2 additions & 2 deletions uwsgiconf/options/alarms.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ class alarm_types(object):
"""Alarm types available for ``.register_alarm()``."""

command = AlarmCommand
signal = AlarmSignal
curl = AlarmCurl
log = AlarmLog
mule = AlarmMule
curl = AlarmCurl
signal = AlarmSignal
xmpp = AlarmXmpp

def __init__(self, *args, **kwargs):
Expand Down
14 changes: 8 additions & 6 deletions uwsgiconf/options/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,23 +241,25 @@ class loggers(object):
"""Loggers available for ``add_logger()``."""

file = LoggerFile
mongo = LoggerMongo
redis = LoggerRedis
socket = LoggerSocket
syslog = LoggerSyslog
redis = LoggerRedis
mongo = LoggerMongo
zeromq = LoggerZeroMq

# todo consider adding other loggers: crypto, graylog2, systemd

class encoders(object):
"""Loggers available for ``add_logger_encoder()``."""

prefix = EncoderPrefix
suffix = EncoderSuffix
newline = EncoderNewline
gzip = EncoderGzip
compress = EncoderCompress
format = EncoderFormat
gzip = EncoderGzip
json = EncoderJson
newline = EncoderNewline
prefix = EncoderPrefix
suffix = EncoderSuffix

# todo consider adding msgpack encoder

def set_basic_params(
Expand Down
17 changes: 7 additions & 10 deletions uwsgiconf/options/main_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,22 +235,19 @@ class MainProcess(OptionsGroup):
class actions(object):
"""Actions available for ``.set_hook()``."""

alarm = ActionAlarm
call = ActionCall
dir_change = ActionDirChange
dir_create = ActionDirCreate
execute = ActionExecute
exit = ActionExit
fifo_write = ActionFifoWrite
file_create = ActionFileCreate
file_write = ActionFileWrite
unlink = ActionUnlink
fifo_write = ActionFifoWrite
mount = ActionMount
execute = ActionExecute

set_host_name = ActionSetHostName
alarm = ActionAlarm
call = ActionCall

# Mainly for testing,
exit = ActionExit
printout = ActionPrintout
set_host_name = ActionSetHostName
unlink = ActionUnlink

# todo consider adding:
# putenv, chmod/sticky, chown/chown2, rpc/retryrpc, unix_signal
Expand Down
24 changes: 12 additions & 12 deletions uwsgiconf/options/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,37 +483,37 @@ class metric_types(object):
User metrics must inherit from one of those.
"""
counter = MetricTypeCounter
gauge = MetricTypeGauge
absolute = MetricTypeAbsolute
alias = MetricTypeAlias
counter = MetricTypeCounter
gauge = MetricTypeGauge

class collectors(object):
"""Metric collection and accumulation means."""

manual = CollectorManual
pointer = CollectorPointer
file = CollectorFile
function = CollectorFunction
sum = CollectorSum
avg = CollectorAvg
accumulator = CollectorAccumulator
adder = CollectorAdder
avg = CollectorAvg
file = CollectorFile
function = CollectorFunction
manual = CollectorManual
multiplier = CollectorMultiplier
pointer = CollectorPointer
sum = CollectorSum

class pushers(object):
"""Means to deliver metrics to various remotes or locals.
These are available for ``.register_stats_pusher()``.
"""
socket = PusherSocket
carbon = PusherCarbon
file = PusherFile
mongo = PusherMongo
rrdtool = PusherRrdtool
socket = PusherSocket
statsd = PusherStatsd
carbon = PusherCarbon
zabbix = PusherZabbix
mongo = PusherMongo
file = PusherFile

def register_metric(self, metric):
"""
Expand Down

0 comments on commit f6d72ff

Please sign in to comment.