mirror of
https://github.com/coder/coder.git
synced 2025-03-14 10:09:57 +00:00
* stream provisioner logs Signed-off-by: Spike Curtis <spike@coder.com> * Fix imports Signed-off-by: Spike Curtis <spike@coder.com> * Better logging, naming, arg order Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
21 lines
545 B
Go
21 lines
545 B
Go
package provisionersdk
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// ProvisionerJobLogsNotifyMessage is the payload published on
|
|
// the provisioner job logs notify channel.
|
|
type ProvisionerJobLogsNotifyMessage struct {
|
|
CreatedAfter int64 `json:"created_after"`
|
|
EndOfLogs bool `json:"end_of_logs,omitempty"`
|
|
}
|
|
|
|
// ProvisionerJobLogsNotifyChannel is the PostgreSQL NOTIFY channel
|
|
// to publish updates to job logs on.
|
|
func ProvisionerJobLogsNotifyChannel(jobID uuid.UUID) string {
|
|
return fmt.Sprintf("provisioner-log-logs:%s", jobID)
|
|
}
|