Documentation ¶
Index ¶
- type API
- type Metrics
- type Nats
- func (n *Nats) AddMetrics(m *Metrics)
- func (n *Nats) PublishApprovedEvent(success bool, msgerr string, service, requestID string, to mint.PublicKey, ...) error
- func (n *Nats) PublishSentEvent(success bool, msgerr string, service, requestID string, to mint.PublicKey, ...) error
- func (n *Nats) Task(token *gotask.Token)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { EnqueueSending(trans types.SendingTransport, id, service, callbackURL string, to mint.PublicKey, amo *amount.Amount, token mint.Token, ignoreApprovement bool) (dup, success bool) EnqueueApprovement(trans types.SendingTransport, id, service, callbackURL string, to mint.PublicKey) (dup, success bool) }
API provides ability to interact with service API
type Metrics ¶
type Metrics struct { RequestDuration *prometheus.HistogramVec NotificationDuration prometheus.Histogram }
Metrics data
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
Nats exposes endpoints via Nats server
func (*Nats) AddMetrics ¶
AddMetrics adds metrics counters and should be called before service launch
func (*Nats) PublishApprovedEvent ¶
func (n *Nats) PublishApprovedEvent( success bool, msgerr string, service, requestID string, to mint.PublicKey, digest *mint.Digest, ) error
PublishApprovedEvent sends an approvement completion notification
Click to show internal directories.
Click to hide internal directories.