listeners

package
v0.0.0-...-1305305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("listeners")

Functions

This section is empty.

Types

type PaymentListenerOperation

type PaymentListenerOperation struct {
	PRClient pr_client.RestPRServiceClient

	Secrets secrets.Client
	// contains filtered or unexported fields
}

func CreatePaymentListenerOperation

func CreatePaymentListenerOperation() PaymentListenerOperation

func (*PaymentListenerOperation) CreatePaymentListeners

func (op *PaymentListenerOperation) CreatePaymentListeners(accounts []model.Account)

CreatePaymentListeners - Set payment listeners for given array of operating accounts

func (*PaymentListenerOperation) GetParticipantOperatingAccounts

func (op *PaymentListenerOperation) GetParticipantOperatingAccounts() (accounts []model.Account, err error)

GetParticipantOperatingAccounts: Extracts all registered operating accounts for a participant from participant registry Alternatively this can also be extracted from secrets store/vault/Local storage directly

func (*PaymentListenerOperation) ReStartListener

func (op *PaymentListenerOperation) ReStartListener(w http.ResponseWriter, request *http.Request)

type StellarAccountPaymentListener

type StellarAccountPaymentListener struct {
	// contains filtered or unexported fields
}

StellarAccountPaymentListener is listening for a new payments received by ReceivingAccount

func NewStellarAccountStellarAccountPaymentListener

func NewStellarAccountStellarAccountPaymentListener(
	horizon horizon.ClientInterface,
) (pl StellarAccountPaymentListener, err error)

NewStellarAccountStellarAccountPaymentListener creates a new StellarAccountPaymentListener

func (*StellarAccountPaymentListener) Listen

func (pl *StellarAccountPaymentListener) Listen(ch chan string) (err error)

Listen starts listening for new payments

func (*StellarAccountPaymentListener) ListenLoop

func (pl *StellarAccountPaymentListener) ListenLoop(ctx context.Context, ch chan string, accountID string, cancelFunc context.CancelFunc, wg *sync.WaitGroup)

func (*StellarAccountPaymentListener) SetDistAccount

func (pl *StellarAccountPaymentListener) SetDistAccount(account model.Account)

SetDistAccount - Save account ID in memory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL