github.com/spotahome/redis-operator@v1.2.4/metrics/dummy.go (about)

     1  package metrics
     2  
     3  import (
     4  	koopercontroller "github.com/spotahome/kooper/v2/controller"
     5  )
     6  
     7  // Dummy is a handy instnce of a dummy instrumenter, most of the times it will be used on tests.
     8  var Dummy = &dummy{
     9  	MetricsRecorder: koopercontroller.DummyMetricsRecorder,
    10  }
    11  
    12  // dummy is a dummy implementation of Instrumenter.
    13  type dummy struct {
    14  	koopercontroller.MetricsRecorder
    15  }
    16  
    17  func (d *dummy) SetClusterOK(namespace string, name string)               {}
    18  func (d *dummy) SetClusterError(namespace string, name string)            {}
    19  func (d *dummy) DeleteCluster(namespace string, name string)              {}
    20  func (d *dummy) SetRedisInstance(IP string, masterIP string, role string) {}
    21  func (d *dummy) ResetRedisInstance()                                      {}
    22  func (d *dummy) RecordEnsureOperation(objectNamespace string, objectName string, objectKind string, resourceName string, status string) {
    23  }
    24  func (d *dummy) RecordRedisCheck(namespace string, resource string, indicator string, instance string, status string) {
    25  }
    26  func (d *dummy) RecordSentinelCheck(namespace string, resource string, indicator string, instance string, status string) {
    27  }
    28  func (d dummy) RecordK8sOperation(namespace string, kind string, object string, operation string, status string, err string) {
    29  }
    30  func (d dummy) RecordRedisOperation(kind string, IP string, operation string, status string, err string) {
    31  }