queue

package
v0.0.0-...-748ecea Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provided data from and to message broker.

func New

func New(ctx context.Context, reg *prometheus.Registry, namespace string, cfg Config) (*Client, error)

New build and returns new queue instance.

func (*Client) AddUser

func (c *Client) AddUser(ctx context.Context, id uuid.UUID, user app.User) error

AddUser implements app.Queue.

func (*Client) Close

func (c *Client) Close() error

Close implements io.Closer.

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID, user app.User) error

DeleteUser implements app.Queue.

func (*Client) Monitor

func (c *Client) Monitor(ctx context.Context) error

Monitor for starting monitor connection background logic.

func (*Client) UpdateUser

func (c *Client) UpdateUser(ctx context.Context, id uuid.UUID, user app.User) error

UpdateUser implements app.Queue.

type Config

type Config struct {
	URLs        []string
	Username    string
	Password    string
	ClusterMode bool
}

Config provide connection info for message broker.

type Metrics

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

Metrics contains general metrics for DAL methods.

func NewMetrics

func NewMetrics(reg *prometheus.Registry, namespace, subsystem string, topics []string) (metric Metrics)

NewMetrics registers and returns common queue metrics.

Jump to

Keyboard shortcuts

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