Documentation
¶
Index ¶
- type PubSubConfig
- type PubSubPlugin
- func (p *PubSubPlugin) GetConnectionInfo() (*plugin.ConnectionInfo, error)
- func (p *PubSubPlugin) GetLogs(ctx context.Context, opts *plugin.LogOptions) ([]string, error)
- func (p *PubSubPlugin) IsReady(ctx context.Context) (bool, error)
- func (p *PubSubPlugin) Launch(ctx context.Context, config map[string]interface{}) error
- func (p *PubSubPlugin) Name() string
- func (p *PubSubPlugin) Stop(ctx context.Context) error
- type SubscriptionConfig
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
type SubscriptionConfig ¶
SubscriptionConfig describes a subscription bound to a topic
Click to show internal directories.
Click to hide internal directories.