Skip to content
Snippets Groups Projects
Select Git revision
  • ee2f6ae33368ff935416e11f972f8a37ecb7a3f1
  • main default protected
  • tags/misc
  • tags/version-0.5r2
  • tags/version-0.6
  • tags/version-0.4
  • tags/version-0.5r1
  • tags/libxaal_v01
  • tags/generic-feedback-renderer_complexAPI
  • tags/testing-libsodium
  • tags/testing-nettle
  • tags/testing_ajax
  • tags/testing_clearsilver
  • tags/testing_jansson
  • tags/testing_jsmn
  • tags/testing_json-c
16 results

translate.dic

Blame
  • events.go 654 B
    package metrics
    
    import (
    	"github.com/iotaledger/hive.go/events"
    )
    
    // Events defines the events of the plugin.
    var Events = pluginEvents{
    	// ReceivedMPSUpdated triggers upon reception of a MPS update.
    	ReceivedMPSUpdated: events.NewEvent(uint64EventCaller),
    	ReceivedTPSUpdated: events.NewEvent(uint64EventCaller),
    }
    
    type pluginEvents struct {
    	// Fired when the messages per second metric is updated.
    	ReceivedMPSUpdated *events.Event
    	// Fired when the transactions per second metric is updated.
    	ReceivedTPSUpdated *events.Event
    }
    
    func uint64EventCaller(handler interface{}, params ...interface{}) {
    	handler.(func(uint64))(params[0].(uint64))
    }