Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
GitHub githubclient.GitHubClient
DB db.Database
}
Config holds the dependencies required to create a Service.
type Service ¶
type Service struct {
hydrav1.UnimplementedGitHubStatusServiceServer
// contains filtered or unexported fields
}
Service is a Restate virtual object keyed by deployment ID that owns all GitHub deployment status reporting. It persists the GitHub deployment ID and PR comment ID in Restate K/V state so that any service can fire-and-forget status updates without needing to carry GitHub context.
func (*Service) Init ¶
func (s *Service) Init(ctx restate.ObjectContext, req *hydrav1.GitHubStatusInitRequest) (*hydrav1.GitHubStatusInitResponse, error)
Init creates the GitHub deployment and PR comment, persisting their IDs in Restate state. It is called once per deployment, after the build step.
func (*Service) ReportStatus ¶
func (s *Service) ReportStatus(ctx restate.ObjectContext, req *hydrav1.GitHubStatusReportRequest) (*hydrav1.GitHubStatusReportResponse, error)
ReportStatus updates both the GitHub deployment status and the PR comment. All calls are fire-and-forget — errors are logged, never propagated.