interfaces

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: GPL-3.0 Imports: 3 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 interface {
	Meter
	Context() context.Context
	Logger() Logger
	Config() Config
	QueueSubscribeSync(subject, queue string) (Subscription, error)
	Close() error
}

type Config

type Config interface {
	GetReadTimeout() time.Duration
	GetMaxConcurrentSize() uint64
	GetConcurrentSize() int
}

type Logger

type Logger interface {
	Error(msg string, args ...any)
	Info(msg string, args ...any)
	Debug(msg string, args ...any)
}

type Meter

type Meter interface {
	Meter() metric.Meter
	WithMeter(metric.Meter)
}

type Msg

type Msg interface {
	GetSubject() string
	IsReply() bool
	ReplyTo() string
	Copy(subject string) Msg
	SetHeader(key, value string)
	Respond([]byte) error
	GetHeader() map[string][]string
	GetData() []byte
	RespondMsg(Msg) error
}

type MsgHandler

type MsgHandler func(ctx context.Context, msg Msg) error

type Subscription

type Subscription interface {
	NextMsg(timeout time.Duration) (Msg, error)
	Drain() error
	GetSubject() string
	Pending() (int64, int64, error)
	Dropped() (int64, error)
	Delivered() (int64, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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