Skip to content

Commit 094cf6c

Browse files
alexluongclaude
andauthored
refactor: rename operation events to operator events (#819)
Renames the v0.16 "operation events" feature to "operator events" throughout config, code, tests, and docs. Only public surface changes are the env var prefix (`OPERATION_EVENTS_*` -> `OPERATOR_EVENTS_*`) and the yaml key (`operation_events` -> `operator_events`); v0.16 is not yet released so no deprecation shim is included. Unchanged on purpose: - Go package name `opevents` and error prefix `opevents:` (abbreviation covers both terms, avoids import churn) - `/opevents` HTTP path and `cmd/e2e/opevents` mock package (internal test scaffolding) - Redis suppression key `opevents:exhausted:*` (state at rest; renaming would orphan in-flight windows) - Topic string constants (e.g. `alert.destination.consecutive_failure`) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8160d43 commit 094cf6c

21 files changed

Lines changed: 104 additions & 104 deletions

cmd/e2e/helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (s *basicSuite) waitForNewDestinationDisabled(tenantID, destID string) {
404404
s.Require().FailNowf("timeout", "timed out waiting for destination %s to be disabled", destID)
405405
}
406406

407-
// waitForOpEvents polls until at least count operation events with the given topic exist.
407+
// waitForOpEvents polls until at least count operator events with the given topic exist.
408408
func (s *basicSuite) waitForOpEvents(topic string, count int) []opeventsmock.ReceivedEvent {
409409
s.T().Helper()
410410
timeout := alertPollTimeout

cmd/e2e/opevents/server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import (
1414
"time"
1515
)
1616

17-
// ReceivedEvent is a single operation event received by the mock server.
17+
// ReceivedEvent is a single operator event received by the mock server.
1818
type ReceivedEvent struct {
19-
Event OperationEvent
19+
Event OperatorEvent
2020
Signature string // raw X-Outpost-Signature header
2121
Body []byte // raw request body (for signature verification)
2222
}
2323

24-
// OperationEvent mirrors internal/opevents.OperationEvent for test decoding.
25-
type OperationEvent struct {
24+
// OperatorEvent mirrors internal/opevents.OperatorEvent for test decoding.
25+
type OperatorEvent struct {
2626
ID string `json:"id"`
2727
Topic string `json:"topic"`
2828
Time time.Time `json:"time"`
@@ -31,7 +31,7 @@ type OperationEvent struct {
3131
Data json.RawMessage `json:"data"`
3232
}
3333

34-
// MockServer captures operation events sent to its HTTP endpoint.
34+
// MockServer captures operator events sent to its HTTP endpoint.
3535
type MockServer struct {
3636
server *http.Server
3737
events []ReceivedEvent
@@ -124,7 +124,7 @@ func (s *MockServer) handleEvent(w http.ResponseWriter, r *http.Request) {
124124
return
125125
}
126126

127-
var event OperationEvent
127+
var event OperatorEvent
128128
if err := json.Unmarshal(body, &event); err != nil {
129129
w.WriteHeader(http.StatusBadRequest)
130130
return

cmd/e2e/suites_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (suite *basicSuite) SetupSuite() {
9393
gin.SetMode(gin.TestMode)
9494
mockServerBaseURL := testinfra.GetMockServer(t)
9595

96-
// Setup operation events mock server
96+
// Setup operator events mock server
9797
oeServer := opeventsmock.NewMockServer()
9898
require.NoError(t, oeServer.Start())
9999
suite.opeventsServer = oeServer
@@ -104,10 +104,10 @@ func (suite *basicSuite) SetupSuite() {
104104
DeploymentID: suite.deploymentID,
105105
})
106106

107-
// Configure operation events HTTP sink
108-
cfg.OperationEvents.Topics = []string{"*"}
109-
cfg.OperationEvents.HTTP.URL = oeServer.GetURL()
110-
cfg.OperationEvents.HTTP.SigningSecret = "test-opevents-secret"
107+
// Configure operator events HTTP sink
108+
cfg.OperatorEvents.Topics = []string{"*"}
109+
cfg.OperatorEvents.HTTP.URL = oeServer.GetURL()
110+
cfg.OperatorEvents.HTTP.SigningSecret = "test-opevents-secret"
111111

112112
require.NoError(t, cfg.Validate(config.Flags{}))
113113

docs/pages/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Outpost offers a range of features designed to provide a robust and flexible eve
1010
- **[Filters](./features/filter.mdx)**: Configure filters on destinations to selectively receive only events matching specific criteria.
1111
- **[Publishing Events](./features/publish-events.mdx)**: Learn how events are published, either to a configured message queue or via the publish API endpoint.
1212
- **[Delivery & Retries](./features/event-delivery.mdx)**: Understand how Outpost ensures reliable event delivery with support for various destination types, retries, and best practices.
13-
- **[Operation Events](./features/operation-events.mdx)**: Subscribe to lifecycle events (delivery failures, destination disabling, retry exhaustion, subscription changes) via HTTP, AWS SQS, GCP Pub/Sub, or RabbitMQ.
13+
- **[Operator Events](./features/operator-events.mdx)**: Subscribe to lifecycle events (delivery failures, destination disabling, retry exhaustion, subscription changes) via HTTP, AWS SQS, GCP Pub/Sub, or RabbitMQ.
1414
- **[Tenant User Portal](./features/tenant-user-portal.mdx)**: Provide your tenants with an optional portal to configure destinations and inspect events.
1515
- **[OpenTelemetry](./features/opentelemetry.mdx)**: Monitor key performance metrics using OpenTelemetry integration.
1616
- **[Logging](./features/logging.mdx)**: Control the verbosity of logs produced by Outpost services.

docs/pages/features/event-delivery.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Manual retries can be triggered for any given attempt via the [Attempts API](/do
1616

1717
## Disabled destinations
1818

19-
If the destination for an event is disabled—through the API, user portal, or automatically because a [failure threshold](/docs/features/operation-events) has been reached—the event will be discarded and cannot be retried.
19+
If the destination for an event is disabled—through the API, user portal, or automatically because a [failure threshold](/docs/features/operator-events) has been reached—the event will be discarded and cannot be retried.
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Operation Events
2+
title: Operator Events
33
---
44

5-
Operation events let you subscribe to lifecycle events from your Outpost deployment — delivery failures, destination disabling, retry exhaustion, and subscription changes. Use them to build alerting, auditing, or automation on top of Outpost.
5+
Operator events let you subscribe to lifecycle events from your Outpost deployment — delivery failures, destination disabling, retry exhaustion, and subscription changes. Use them to build alerting, auditing, or automation on top of Outpost.
66

77
## Configuration
88

9-
Enable operation events by specifying which topics to subscribe to and configuring a sink to receive them.
9+
Enable operator events by specifying which topics to subscribe to and configuring a sink to receive them.
1010

1111
### Topics
1212

13-
Set `OPERATION_EVENTS_TOPICS` to a comma-separated list of topics, or `*` for all topics:
13+
Set `OPERATOR_EVENTS_TOPICS` to a comma-separated list of topics, or `*` for all topics:
1414

1515
```
16-
OPERATION_EVENTS_TOPICS=*
16+
OPERATOR_EVENTS_TOPICS=*
1717
```
1818

1919
Available topics:
@@ -25,7 +25,7 @@ Available topics:
2525
| `alert.attempt.exhausted_retries` | Delivery exhausts all retry attempts (deduplicated per event+destination) |
2626
| `tenant.subscription.updated` | Destination created, updated, deleted, disabled, or enabled (when topics or destination count changes) |
2727

28-
If `OPERATION_EVENTS_TOPICS` is empty or unset, operation events are disabled. If topics are configured but no sink is set, Outpost will fail to start.
28+
If `OPERATOR_EVENTS_TOPICS` is empty or unset, operator events are disabled. If topics are configured but no sink is set, Outpost will fail to start.
2929

3030
### Sinks
3131

@@ -36,8 +36,8 @@ Configure exactly one sink to receive events. Four sink types are supported:
3636
Sends events as POST requests to a URL, signed with HMAC-SHA256.
3737

3838
```
39-
OPERATION_EVENTS_HTTP_URL=https://example.com/outpost-events
40-
OPERATION_EVENTS_HTTP_SIGNING_SECRET=your-secret
39+
OPERATOR_EVENTS_HTTP_URL=https://example.com/outpost-events
40+
OPERATOR_EVENTS_HTTP_SIGNING_SECRET=your-secret
4141
```
4242

4343
The HTTP sink signs each request body and sends the signature in the `X-Outpost-Signature` header:
@@ -57,31 +57,31 @@ assert signature_header == f"v0={expected}"
5757
#### AWS SQS
5858

5959
```
60-
OPERATION_EVENTS_AWS_SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/123456789/outpost-events
61-
OPERATION_EVENTS_AWS_SQS_ACCESS_KEY_ID=AKIA...
62-
OPERATION_EVENTS_AWS_SQS_SECRET_ACCESS_KEY=...
63-
OPERATION_EVENTS_AWS_SQS_REGION=us-east-1
64-
OPERATION_EVENTS_AWS_SQS_ENDPOINT= # optional, for local dev
60+
OPERATOR_EVENTS_AWS_SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/123456789/outpost-events
61+
OPERATOR_EVENTS_AWS_SQS_ACCESS_KEY_ID=AKIA...
62+
OPERATOR_EVENTS_AWS_SQS_SECRET_ACCESS_KEY=...
63+
OPERATOR_EVENTS_AWS_SQS_REGION=us-east-1
64+
OPERATOR_EVENTS_AWS_SQS_ENDPOINT= # optional, for local dev
6565
```
6666

6767
#### GCP Pub/Sub
6868

6969
```
70-
OPERATION_EVENTS_GCP_PUBSUB_PROJECT_ID=my-project
71-
OPERATION_EVENTS_GCP_PUBSUB_TOPIC_ID=outpost-events
72-
OPERATION_EVENTS_GCP_PUBSUB_CREDENTIALS={"type":"service_account",...}
70+
OPERATOR_EVENTS_GCP_PUBSUB_PROJECT_ID=my-project
71+
OPERATOR_EVENTS_GCP_PUBSUB_TOPIC_ID=outpost-events
72+
OPERATOR_EVENTS_GCP_PUBSUB_CREDENTIALS={"type":"service_account",...}
7373
```
7474

7575
#### RabbitMQ
7676

7777
```
78-
OPERATION_EVENTS_RABBITMQ_SERVER_URL=amqp://guest:guest@localhost:5672
79-
OPERATION_EVENTS_RABBITMQ_EXCHANGE=outpost-events
78+
OPERATOR_EVENTS_RABBITMQ_SERVER_URL=amqp://guest:guest@localhost:5672
79+
OPERATOR_EVENTS_RABBITMQ_EXCHANGE=outpost-events
8080
```
8181

8282
## Event Envelope
8383

84-
All operation events share a common envelope:
84+
All operator events share a common envelope:
8585

8686
```json
8787
{
@@ -185,7 +185,7 @@ Emitted when a destination is created, updated, deleted, disabled, or enabled, a
185185

186186
## Delivery Guarantees
187187

188-
Operation events are delivered on a best-effort basis with up to 3 attempts. Consumers should use the `id` field for deduplication.
188+
Operator events are delivered on a best-effort basis with up to 3 attempts. Consumers should use the `id` field for deduplication.
189189

190190
## Related Configuration
191191

docs/pages/guides/upgrade-v0.16.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This guide covers breaking changes and migration steps when upgrading from v0.15
1212
| [Event `destination_id` replaced with `matched_destination_ids`](#event-destination_id-replaced-with-matched_destination_ids) | Event API responses and queries | Update code that reads `destination_id` from events to use `matched_destination_ids` |
1313
| [Delivery metadata timestamp format](#delivery-metadata-timestamp-format) | Consumers of delivery metadata `timestamp` field | Update timestamp parsing from Unix seconds to ISO 8601 |
1414
| [Response data body stored as raw string](#response-data-body-stored-as-raw-string) | Consumers of `response_data.body` | Update code that treats `response_data.body` as a parsed JSON object |
15-
| [Alert callbacks replaced by operation events](#alert-callbacks-replaced-by-operation-events) | Users of `ALERT_CALLBACK_URL` | Migrate to `OPERATION_EVENTS_*` config |
15+
| [Alert callbacks replaced by operator events](#alert-callbacks-replaced-by-operator-events) | Users of `ALERT_CALLBACK_URL` | Migrate to `OPERATOR_EVENTS_*` config |
1616

1717
## Webhook Signing Secret Prefix Changed
1818

@@ -111,13 +111,13 @@ The `attempts.response_data` column is migrated from JSONB to TEXT (migration `0
111111

112112
**Action:** Update any code that reads `response_data.body` as a structured object. If you need the parsed object, parse the string with `JSON.parse()` (or equivalent) on the client side.
113113

114-
## Alert Callbacks Replaced by Operation Events
114+
## Alert Callbacks Replaced by Operator Events
115115

116-
The `ALERT_CALLBACK_URL` config has been removed. Alert notifications are now handled by the new **operation events** system, which supports multiple sink types and additional event topics.
116+
The `ALERT_CALLBACK_URL` config has been removed. Alert notifications are now handled by the new **operator events** system, which supports multiple sink types and additional event topics.
117117

118118
### Migration
119119

120-
If you were using `ALERT_CALLBACK_URL` to receive alert callbacks via HTTP, migrate to the operation events HTTP sink:
120+
If you were using `ALERT_CALLBACK_URL` to receive alert callbacks via HTTP, migrate to the operator events HTTP sink:
121121

122122
**v0.15:**
123123
```
@@ -126,24 +126,24 @@ ALERT_CALLBACK_URL=https://example.com/alerts
126126

127127
**v0.16:**
128128
```
129-
OPERATION_EVENTS_TOPICS=*
130-
OPERATION_EVENTS_HTTP_URL=https://example.com/alerts
131-
OPERATION_EVENTS_HTTP_SIGNING_SECRET=your-secret
129+
OPERATOR_EVENTS_TOPICS=*
130+
OPERATOR_EVENTS_HTTP_URL=https://example.com/alerts
131+
OPERATOR_EVENTS_HTTP_SIGNING_SECRET=your-secret
132132
```
133133

134134
The HTTP sink signs payloads with HMAC-SHA256 and sends the signature in the `X-Outpost-Signature` header (format: `v0=<hex>`).
135135

136136
### New sink options
137137

138-
In addition to HTTP, operation events can be sent to:
138+
In addition to HTTP, operator events can be sent to:
139139

140-
- **AWS SQS**`OPERATION_EVENTS_AWS_SQS_QUEUE_URL`, `OPERATION_EVENTS_AWS_SQS_ACCESS_KEY_ID`, `OPERATION_EVENTS_AWS_SQS_SECRET_ACCESS_KEY`, `OPERATION_EVENTS_AWS_SQS_REGION`
141-
- **GCP Pub/Sub**`OPERATION_EVENTS_GCP_PUBSUB_PROJECT_ID`, `OPERATION_EVENTS_GCP_PUBSUB_TOPIC_ID`, `OPERATION_EVENTS_GCP_PUBSUB_CREDENTIALS`
142-
- **RabbitMQ**`OPERATION_EVENTS_RABBITMQ_SERVER_URL`, `OPERATION_EVENTS_RABBITMQ_EXCHANGE`
140+
- **AWS SQS**`OPERATOR_EVENTS_AWS_SQS_QUEUE_URL`, `OPERATOR_EVENTS_AWS_SQS_ACCESS_KEY_ID`, `OPERATOR_EVENTS_AWS_SQS_SECRET_ACCESS_KEY`, `OPERATOR_EVENTS_AWS_SQS_REGION`
141+
- **GCP Pub/Sub**`OPERATOR_EVENTS_GCP_PUBSUB_PROJECT_ID`, `OPERATOR_EVENTS_GCP_PUBSUB_TOPIC_ID`, `OPERATOR_EVENTS_GCP_PUBSUB_CREDENTIALS`
142+
- **RabbitMQ**`OPERATOR_EVENTS_RABBITMQ_SERVER_URL`, `OPERATOR_EVENTS_RABBITMQ_EXCHANGE`
143143

144144
### Event topics
145145

146-
Use `OPERATION_EVENTS_TOPICS=*` for all topics, or specify a comma-separated list:
146+
Use `OPERATOR_EVENTS_TOPICS=*` for all topics, or specify a comma-separated list:
147147

148148
- `alert.destination.consecutive_failure` — emitted at 50%, 70%, 90%, and 100% failure thresholds
149149
- `alert.destination.disabled` — emitted when a destination is auto-disabled
@@ -185,7 +185,7 @@ You can now disable the webhook header prefix by setting it to whitespace (e.g.,
185185
- [ ] Update code that reads `event.destination_id` to use `event.matched_destination_ids`
186186
- [ ] Update any timestamp metadata parsing from Unix seconds to ISO 8601
187187
- [ ] Update code that reads `response_data.body` as a parsed object — it is now a raw string
188-
- [ ] If using `ALERT_CALLBACK_URL`, migrate to `OPERATION_EVENTS_*` config
188+
- [ ] If using `ALERT_CALLBACK_URL`, migrate to `OPERATOR_EVENTS_*` config
189189
- [ ] Review alert default changes (consecutive failure count: 20→100, auto-disable: true→false) and set explicitly if needed
190190
- [ ] Update SDK dependencies to the latest version
191191

docs/zudoku.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const config: ZudokuConfig = {
114114
{ type: "doc", id: "features/filter" },
115115
{ type: "doc", id: "features/publish-events" },
116116
{ type: "doc", id: "features/event-delivery" },
117-
{ type: "doc", id: "features/operation-events" },
117+
{ type: "doc", id: "features/operator-events" },
118118
{ type: "doc", id: "features/tenant-user-portal" },
119119
{ type: "doc", id: "features/opentelemetry" },
120120
{ type: "doc", id: "features/logging" },

internal/apirouter/destination_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"go.uber.org/zap"
2020
)
2121

22-
// SubscriptionEmitter emits operation events for subscription changes.
22+
// SubscriptionEmitter emits operator events for subscription changes.
2323
// Satisfied by opevents.Emitter.
2424
type SubscriptionEmitter interface {
2525
Emit(ctx context.Context, topic string, tenantID string, data any) error

internal/config/config.go

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ type Config struct {
105105
// Alert
106106
Alert AlertConfig `yaml:"alert"`
107107

108-
// Operation Events
109-
OperationEvents OperationEventsConfig `yaml:"operation_events"`
108+
// Operator Events
109+
OperatorEvents OperatorEventsConfig `yaml:"operator_events"`
110110

111111
// ID Generation
112112
IDGen IDGenConfig `yaml:"idgen"`
@@ -410,39 +410,39 @@ func (c *ClickHouseConfig) ToConfig() *clickhouse.ClickHouseConfig {
410410
}
411411
}
412412

413-
type OperationEventsConfig struct {
414-
Topics []string `yaml:"topics" env:"OPERATION_EVENTS_TOPICS" envSeparator:"," desc:"Comma-separated list of operation event topics to emit. Use '*' for all topics. If empty, operation events are disabled." required:"N"`
415-
HTTP OperationEventsHTTPConfig `yaml:"http"`
416-
AWSSQS OperationEventsAWSSQSConfig `yaml:"aws_sqs"`
417-
GCPPubSub OperationEventsGCPConfig `yaml:"gcp_pubsub"`
418-
RabbitMQ OperationEventsRabbitMQConfig `yaml:"rabbitmq"`
413+
type OperatorEventsConfig struct {
414+
Topics []string `yaml:"topics" env:"OPERATOR_EVENTS_TOPICS" envSeparator:"," desc:"Comma-separated list of operator event topics to emit. Use '*' for all topics. If empty, operator events are disabled." required:"N"`
415+
HTTP OperatorEventsHTTPConfig `yaml:"http"`
416+
AWSSQS OperatorEventsAWSSQSConfig `yaml:"aws_sqs"`
417+
GCPPubSub OperatorEventsGCPConfig `yaml:"gcp_pubsub"`
418+
RabbitMQ OperatorEventsRabbitMQConfig `yaml:"rabbitmq"`
419419
}
420420

421-
type OperationEventsHTTPConfig struct {
422-
URL string `yaml:"url" env:"OPERATION_EVENTS_HTTP_URL" desc:"URL to POST operation events to." required:"N"`
423-
SigningSecret string `yaml:"signing_secret" env:"OPERATION_EVENTS_HTTP_SIGNING_SECRET" desc:"HMAC-SHA256 signing secret for operation event payloads." required:"N"`
421+
type OperatorEventsHTTPConfig struct {
422+
URL string `yaml:"url" env:"OPERATOR_EVENTS_HTTP_URL" desc:"URL to POST operator events to." required:"N"`
423+
SigningSecret string `yaml:"signing_secret" env:"OPERATOR_EVENTS_HTTP_SIGNING_SECRET" desc:"HMAC-SHA256 signing secret for operator event payloads." required:"N"`
424424
}
425425

426-
type OperationEventsAWSSQSConfig struct {
427-
QueueURL string `yaml:"queue_url" env:"OPERATION_EVENTS_AWS_SQS_QUEUE_URL" desc:"AWS SQS queue URL for operation events." required:"N"`
428-
AccessKeyID string `yaml:"access_key_id" env:"OPERATION_EVENTS_AWS_SQS_ACCESS_KEY_ID" desc:"AWS access key ID for SQS operation events sink." required:"N"`
429-
SecretAccessKey string `yaml:"secret_access_key" env:"OPERATION_EVENTS_AWS_SQS_SECRET_ACCESS_KEY" desc:"AWS secret access key for SQS operation events sink." required:"N"`
430-
Region string `yaml:"region" env:"OPERATION_EVENTS_AWS_SQS_REGION" desc:"AWS region for SQS operation events sink." required:"N"`
431-
Endpoint string `yaml:"endpoint" env:"OPERATION_EVENTS_AWS_SQS_ENDPOINT" desc:"Custom AWS SQS endpoint for operation events. Optional, for local development." required:"N"`
426+
type OperatorEventsAWSSQSConfig struct {
427+
QueueURL string `yaml:"queue_url" env:"OPERATOR_EVENTS_AWS_SQS_QUEUE_URL" desc:"AWS SQS queue URL for operator events." required:"N"`
428+
AccessKeyID string `yaml:"access_key_id" env:"OPERATOR_EVENTS_AWS_SQS_ACCESS_KEY_ID" desc:"AWS access key ID for SQS operator events sink." required:"N"`
429+
SecretAccessKey string `yaml:"secret_access_key" env:"OPERATOR_EVENTS_AWS_SQS_SECRET_ACCESS_KEY" desc:"AWS secret access key for SQS operator events sink." required:"N"`
430+
Region string `yaml:"region" env:"OPERATOR_EVENTS_AWS_SQS_REGION" desc:"AWS region for SQS operator events sink." required:"N"`
431+
Endpoint string `yaml:"endpoint" env:"OPERATOR_EVENTS_AWS_SQS_ENDPOINT" desc:"Custom AWS SQS endpoint for operator events. Optional, for local development." required:"N"`
432432
}
433433

434-
type OperationEventsGCPConfig struct {
435-
ProjectID string `yaml:"project_id" env:"OPERATION_EVENTS_GCP_PUBSUB_PROJECT_ID" desc:"GCP project ID for Pub/Sub operation events sink." required:"N"`
436-
TopicID string `yaml:"topic_id" env:"OPERATION_EVENTS_GCP_PUBSUB_TOPIC_ID" desc:"GCP Pub/Sub topic ID for operation events." required:"N"`
437-
Credentials string `yaml:"credentials" env:"OPERATION_EVENTS_GCP_PUBSUB_CREDENTIALS" desc:"GCP service account credentials JSON for Pub/Sub operation events sink." required:"N"`
434+
type OperatorEventsGCPConfig struct {
435+
ProjectID string `yaml:"project_id" env:"OPERATOR_EVENTS_GCP_PUBSUB_PROJECT_ID" desc:"GCP project ID for Pub/Sub operator events sink." required:"N"`
436+
TopicID string `yaml:"topic_id" env:"OPERATOR_EVENTS_GCP_PUBSUB_TOPIC_ID" desc:"GCP Pub/Sub topic ID for operator events." required:"N"`
437+
Credentials string `yaml:"credentials" env:"OPERATOR_EVENTS_GCP_PUBSUB_CREDENTIALS" desc:"GCP service account credentials JSON for Pub/Sub operator events sink." required:"N"`
438438
}
439439

440-
type OperationEventsRabbitMQConfig struct {
441-
ServerURL string `yaml:"server_url" env:"OPERATION_EVENTS_RABBITMQ_SERVER_URL" desc:"RabbitMQ server URL for operation events sink." required:"N"`
442-
Exchange string `yaml:"exchange" env:"OPERATION_EVENTS_RABBITMQ_EXCHANGE" desc:"RabbitMQ exchange for operation events." required:"N"`
440+
type OperatorEventsRabbitMQConfig struct {
441+
ServerURL string `yaml:"server_url" env:"OPERATOR_EVENTS_RABBITMQ_SERVER_URL" desc:"RabbitMQ server URL for operator events sink." required:"N"`
442+
Exchange string `yaml:"exchange" env:"OPERATOR_EVENTS_RABBITMQ_EXCHANGE" desc:"RabbitMQ exchange for operator events." required:"N"`
443443
}
444444

445-
func (c *OperationEventsConfig) ToConfig() opevents.Config {
445+
func (c *OperatorEventsConfig) ToConfig() opevents.Config {
446446
cfg := opevents.Config{
447447
Topics: c.Topics,
448448
}

0 commit comments

Comments
 (0)