pubsub

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSubConfig

type PubSubConfig struct {
	Image         string               `json:"image"`
	Port          string               `json:"port"`
	ProjectID     string               `json:"project-id"`
	Topics        []string             `json:"topics"`
	Subscriptions []SubscriptionConfig `json:"subscriptions"`
	ContainerName string               `json:"container-name"`
}

PubSubConfig holds Pub/Sub-specific configuration

type PubSubPlugin

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

PubSubPlugin implements the ServicePlugin interface for the Google Cloud Pub/Sub emulator.

func NewPubSubPlugin

func NewPubSubPlugin(dockerClient *docker.Client, logger *zap.Logger) *PubSubPlugin

NewPubSubPlugin creates a new Pub/Sub service plugin

func (*PubSubPlugin) GetConnectionInfo

func (p *PubSubPlugin) GetConnectionInfo() (*plugin.ConnectionInfo, error)

GetConnectionInfo returns connection details

func (*PubSubPlugin) GetLogs

func (p *PubSubPlugin) GetLogs(ctx context.Context, opts *plugin.LogOptions) ([]string, error)

GetLogs retrieves service logs

func (*PubSubPlugin) IsReady

func (p *PubSubPlugin) IsReady(ctx context.Context) (bool, error)

IsReady checks if the Pub/Sub emulator REST API is accepting requests

func (*PubSubPlugin) Launch

func (p *PubSubPlugin) Launch(ctx context.Context, config map[string]interface{}) error

Launch starts the Pub/Sub emulator with given configuration

func (*PubSubPlugin) Name

func (p *PubSubPlugin) Name() string

Name returns the service identifier

func (*PubSubPlugin) Stop

func (p *PubSubPlugin) Stop(ctx context.Context) error

Stop terminates the Pub/Sub service

type SubscriptionConfig

type SubscriptionConfig struct {
	Name  string `json:"name"`
	Topic string `json:"topic"`
}

SubscriptionConfig describes a subscription bound to a topic

Jump to

Keyboard shortcuts

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