Implement Insert()
for metricsClientWrapper
This commit is contained in:
parent
5f6d6315e5
commit
f62989fff7
@ -51,6 +51,15 @@ func (m *metricsClientWrapper) AppendUnique(table string, chain string, rule ...
|
|||||||
return m.client.AppendUnique(table, chain, rule...)
|
return m.client.AppendUnique(table, chain, rule...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *metricsClientWrapper) Insert(table string, chain string, pos int, rule ...string) error {
|
||||||
|
m.operationCounter.With(prometheus.Labels{
|
||||||
|
"operation": "Insert",
|
||||||
|
"table": table,
|
||||||
|
"chain": chain,
|
||||||
|
}).Inc()
|
||||||
|
return m.client.Insert(table, chain, pos, rule...)
|
||||||
|
}
|
||||||
|
|
||||||
func (m *metricsClientWrapper) Delete(table string, chain string, rule ...string) error {
|
func (m *metricsClientWrapper) Delete(table string, chain string, rule ...string) error {
|
||||||
m.operationCounter.With(prometheus.Labels{
|
m.operationCounter.With(prometheus.Labels{
|
||||||
"operation": "Delete",
|
"operation": "Delete",
|
||||||
|
Loading…
Reference in New Issue
Block a user