Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNilConfig = errors.New("cannot override nil config")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MonitorProcessTopic string `yaml:"monitor_process_topic"` PaymentProccessingTime time.Duration `yaml:"payment_processing_time"` SucceededTransactionTopic string `yaml:"succeeded_transaction_topic"` FailedTransactionTopic string `yaml:"failed_transaction_topic"` }
Config represents publisher configuration parameters.
type PaymentWorker ¶
type PaymentWorker interface { Start(context.Context) error Stop(StopReason) error }
PaymentWorker defines the behavior of a worker responsible for processing payments.
type ProccessPaymentError ¶
type ProccessPaymentError struct {
// contains filtered or unexported fields
}
ProcessPaymentError represents an error type associated with payment processing.
func NewProccessPaymentError ¶
func NewProccessPaymentError(msg string, err error) *ProccessPaymentError
NewProcessPaymentError creates a new instance of ProcessPaymentError with the given message and error.
func (ProccessPaymentError) Error ¶
func (e ProccessPaymentError) Error() string
type StartError ¶
type StartError struct {
// contains filtered or unexported fields
}
StartError represents an error encountered during start payment worker.
func NewStartError ¶
func NewStartError(msg string, err error) *StartError
NewStartError creates a new instance of StartError with the given message and error.
func (StartError) Error ¶
func (e StartError) Error() string
type StopReason ¶
type StopReason int
StopReason represents the reason for stopping a PaymentWorker.
const ( Undefined StopReason = iota CancelledTransaction Shutdown )
type WorkerError ¶
type WorkerError struct {
// contains filtered or unexported fields
}
WorkerError represents an error encountered during creation payment worker.
func NewWorkerError ¶
func NewWorkerError(msg string, err error) *WorkerError
NewWorkerError creates a new instance of WorkerError with the given message and error.
func (WorkerError) Error ¶
func (e WorkerError) Error() string