github.com/decred/dcrlnd@v0.7.6/funding/interfaces.go (about)

     1  package funding
     2  
     3  import (
     4  	"github.com/decred/dcrlnd/lnpeer"
     5  	"github.com/decred/dcrlnd/lnwire"
     6  )
     7  
     8  // Controller is an interface with basic funding flow functions.
     9  // It describes the basic functionality of a funding manager.
    10  // It should at a minimum process a subset of lnwire messages that
    11  // are denoted as funding messages.
    12  type Controller interface {
    13  	// ProcessFundingMsg processes a funding message represented by the
    14  	// lnwire.Message parameter along with the Peer object representing a
    15  	// connection to the counterparty.
    16  	ProcessFundingMsg(lnwire.Message, lnpeer.Peer)
    17  
    18  	// IsPendingChannel returns whether a particular 32-byte identifier
    19  	// represents a pending channel in the Controller implementation.
    20  	IsPendingChannel([32]byte, lnpeer.Peer) bool
    21  }