Documentation
¶
Index ¶
- Constants
- func GetVAPIDKeyPair(app core.App) (publicKey string, privateKey string, err error)
- func NotifyPipelineRunCompletion(ctx context.Context, app core.App, req CompletionRequest) (int, error)
- func NotifyPipelineStartFailure(ctx context.Context, app core.App, req StartFailureRequest) (int, error)
- type CompletionRequest
- type StartFailureRequest
Constants ¶
const ( // EnvVAPIDPublicKey overrides the stored VAPID public key. EnvVAPIDPublicKey = "CREDIMI_WEB_PUSH_VAPID_PUBLIC_KEY" // EnvVAPIDPrivateKey overrides the stored VAPID private key. EnvVAPIDPrivateKey = "CREDIMI_WEB_PUSH_VAPID_PRIVATE_KEY" )
const StartFailureResult = "start_failed"
StartFailureResult is the push payload result of a queued pipeline run that could not start; it never got a Temporal run.
Variables ¶
This section is empty.
Functions ¶
func GetVAPIDKeyPair ¶
GetVAPIDKeyPair returns the Web Push VAPID key pair, generating and persisting a new one on first use. When both environment variables are set they take precedence over the stored key pair.
func NotifyPipelineRunCompletion ¶
func NotifyPipelineRunCompletion( ctx context.Context, app core.App, req CompletionRequest, ) (int, error)
NotifyPipelineRunCompletion sends a Web Push notification about a finished pipeline run to every push subscription of the organization members. Per-subscription failures are collected into the returned error without aborting the remaining sends. Dead subscriptions (HTTP 404/410) are pruned.
func NotifyPipelineStartFailure ¶ added in v1.325.0
func NotifyPipelineStartFailure( ctx context.Context, app core.App, req StartFailureRequest, ) (int, error)
NotifyPipelineStartFailure sends a Web Push notification about a pipeline run that could not start to every push subscription of the organization members, with the same delivery rules as NotifyPipelineRunCompletion.
Types ¶
type CompletionRequest ¶
type CompletionRequest struct {
OrgID string
PipelineName string
Organization string
WorkflowID string
RunID string
Result string
Duration string
Error string
AppURL string
}
CompletionRequest describes a finished pipeline run to notify users about.
type StartFailureRequest ¶ added in v1.325.0
type StartFailureRequest struct {
OrgID string
PipelineName string
// PipelinePath is the canonified pipeline path (`<org>/<pipeline>`); the
// notification links to its pipeline page.
PipelinePath string
Organization string
Error string
AppURL string
}
StartFailureRequest describes a queued or scheduled pipeline run that the device semaphore could not start.