consumer

package
v1.0.0-beta.172 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBalanceAvailable = errors.New("no balance available")

Functions

This section is empty.

Types

type BalanceThresholdEventHandler

type BalanceThresholdEventHandler struct {
	Notification notification.Service
	Logger       *slog.Logger
}

func (*BalanceThresholdEventHandler) Handle

type BalanceThresholdEventHandlerState

type BalanceThresholdEventHandlerState struct {
	TotalGrants float64 `json:"totalGrants"`
}

type Consumer

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

func New

func New(opts Options) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Handle

func (c *Consumer) Handle(ctx context.Context, event snapshot.SnapshotEvent) error

func (*Consumer) Run

func (c *Consumer) Run(ctx context.Context) error

type Options

type Options struct {
	SystemEventsTopic string

	Router router.Options

	Notification notification.Service

	Marshaler marshaler.Marshaler

	Logger *slog.Logger
}

Jump to

Keyboard shortcuts

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