mqinfra

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfig      = fmt.Errorf("invalid config")
	ErrInfraUnimplemented = fmt.Errorf("unimplemented infra")
)

Functions

This section is empty.

Types

type AWSSQSInfraConfig added in v0.3.0

type AWSSQSInfraConfig struct {
	Endpoint                  string
	Region                    string
	ServiceAccountCredentials string
	Topic                     string
}

type AzureServiceBusInfraConfig added in v0.3.0

type AzureServiceBusInfraConfig struct {
	ConnectionString string // If set, skip infra management

	TenantID       string
	ClientID       string
	ClientSecret   string
	SubscriptionID string
	ResourceGroup  string
	Namespace      string
	Topic          string
	Subscription   string
}

type GCPPubSubInfraConfig added in v0.3.0

type GCPPubSubInfraConfig struct {
	ProjectID                 string
	TopicID                   string
	SubscriptionID            string
	ServiceAccountCredentials string
}

type MQInfra

type MQInfra interface {
	Exist(ctx context.Context) (bool, error)
	Declare(ctx context.Context) error
	TearDown(ctx context.Context) error
}

func New

func New(cfg *MQInfraConfig) MQInfra

type MQInfraConfig added in v0.3.0

type MQInfraConfig struct {
	AWSSQS          *AWSSQSInfraConfig
	AzureServiceBus *AzureServiceBusInfraConfig
	GCPPubSub       *GCPPubSubInfraConfig
	RabbitMQ        *RabbitMQInfraConfig

	Policy Policy
}

type Policy added in v0.3.0

type Policy struct {
	VisibilityTimeout int
	RetryLimit        int
}

type RabbitMQInfraConfig added in v0.3.0

type RabbitMQInfraConfig struct {
	ServerURL string
	Exchange  string
	Queue     string
}

Jump to

Keyboard shortcuts

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