Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyOpts = &Opts{}
Functions ¶
This section is empty.
Types ¶
type ConsumerInput ¶
type ConsumerInput interface {
UpFn(ctx context.Context, payload PayloadInput) error
DownFn(ctx context.Context, payload PayloadInput) error
GetConfig() Opts
GetEventName() string
}
type Opts ¶
type Opts struct {
Kind string `json:"kind"`
MaxRetry int `json:"retry"`
Delay time.Duration `json:"timout"`
MaxTimeOfProcessTask time.Duration `json:"max_time_of_process_task"`
DeadLine time.Time `json:"dead_line"`
Queue string `json:"queue"`
Unique time.Duration `json:"unique"`
}
Opts
type PayloadInput ¶
type PayloadInput struct {
EventID uuid.UUID `json:"event_id"`
Data []byte `json:"payload"`
CreatedAt time.Time `json:"created_at"`
}
func (PayloadInput) Parser ¶
func (p PayloadInput) Parser(v any) error
type PayloadType ¶
type PayloadType struct {
TransactionEventID uuid.UUID `json:"transaction_event_id"`
EventID uuid.UUID `json:"event_id"`
Payload PayloadInput `json:"payload"`
EventName string `json:"event_name"`
EventsNames []string `json:"events_names"`
Opts Opts `json:"opts"`
Info map[string]any `json:"info"`
Type EventType `json:"type"`
CreatedAt time.Time `json:"created_at"`
}
type Repository ¶
type Repository interface {
UpdateInfos(ctx context.Context, txID uuid.UUID, retry int, status string) error
SaveTx(ctx context.Context, input PayloadType) error
SagaUpdateInfos(ctx context.Context, txID uuid.UUID, retry int, status string) error
SagaSaveTx(ctx context.Context, input PayloadType) error
Close()
}
Repository defines the methods that the Client struct must implement
type TimeProvider ¶
Click to show internal directories.
Click to hide internal directories.