Skip to content
Snippets Groups Projects
Select Git revision
  • 01258bba46b7ae81ce221ded1d310ca4095a9b70
  • master default
  • notifications_test_ndf
  • main_ud_local_ndf
  • crust-integration
  • new-client
  • internal_build
  • FE-1054_test_net_ndf
  • FE-1053_change_retry_behavior
  • app_modularization_refactor
  • FE_1020_remove_version_check
  • FE-992_android_migration
  • XX-4094_add_fact_panic
  • FE-990_retry_reset_request
  • development
  • 2.92
  • 2.9
  • 2.8
  • 2.7
  • 2.5
  • 2.3
  • 2.2
  • 2.1
  • 2.04
  • 2.03
  • 2.02
26 results

gradle.properties

Blame
  • roundEvents.go 1.74 KiB
    ///////////////////////////////////////////////////////////////////////////////
    // Copyright © 2020 xx network SEZC                                          //
    //                                                                           //
    // Use of this source code is governed by a license that can be found in the //
    // LICENSE file                                                              //
    ///////////////////////////////////////////////////////////////////////////////
    
    package interfaces
    
    import (
    	ds "gitlab.com/elixxir/comms/network/dataStructures"
    	"gitlab.com/elixxir/primitives/states"
    	"gitlab.com/xx_network/primitives/id"
    	"time"
    )
    
    // The round events interface allows the registration of an event which triggers
    // when a round reaches one or more states
    
    type RoundEvents interface {
    	// designates a callback to call on the specified event
    	// rid is the id of the round the event occurs on
    	// callback is the callback the event is triggered on
    	// timeout is the amount of time before an error event is returned
    	// valid states are the states which the event should trigger on
    	AddRoundEvent(rid id.Round, callback ds.RoundEventCallback,
    		timeout time.Duration, validStates ...states.Round) *ds.EventCallback
    
    	// designates a go channel to signal the specified event
    	// rid is the id of the round the event occurs on
    	// eventChan is the channel the event is triggered on
    	// timeout is the amount of time before an error event is returned
    	// valid states are the states which the event should trigger on
    	AddRoundEventChan(rid id.Round, eventChan chan ds.EventReturn,
    		timeout time.Duration, validStates ...states.Round) *ds.EventCallback
    
    	//Allows the un-registration of a round event before it triggers
    	Remove(rid id.Round, e *ds.EventCallback)
    }