Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Publish(ctx context.Context, event RolloutEvent) error
}
Client represents a client to Google Cloud Pub/Sub.
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
PubSub is a Google Cloud Pub/Sub client to publish messages.
type RolloutEvent ¶
type RolloutEvent struct { Event string `json:"event"` CandidateRevisionName string `json:"candidateRevisionName"` CandidateRevisionPercent int `json:"candidateRevisionPercent"` CandidateRevisionURL string `json:"candidateRevisionURL"` CandidateWasPromotedToStable bool `json:"candidateWasPromotedToStable"` Service *run.Service `json:"service"` }
RolloutEvent is the format of an event published to Pub/Sub.
func NewRolloutEvent ¶
func NewRolloutEvent(svc *run.Service, diagnosis health.DiagnosisResult, candidateWasPromoted bool) (RolloutEvent, error)
NewRolloutEvent initializes an event to publish to PubSub.
svc must be the updated Service instance as the result of the rollout.
Click to show internal directories.
Click to hide internal directories.