Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WireSet = wire.NewSet( ProvideRunnerManager, )
Functions ¶
This section is empty.
Types ¶
type RunnerManager ¶
type RunnerManager interface {
// GetPrimaryServerUID returns the primary server UID.
GetPrimaryServerUID(ctx context.Context) (int64, error) //NOTE: temporary
// Config returns the runner config for the server.
Config(ctx context.Context, serverUID int64) (*types.RunnerConfig, error)
// Request requests the next available deployment for execution.
Request(ctx context.Context) (*types.Deployment, error)
// Accept accepts a deployment for execution.
Accept(ctx context.Context, deploymentID int64, machine string) (*types.Deployment, error)
// Details returns all the information for the deployment to be executed.
Details(ctx context.Context, deploymentID int64) (*pipeline.RunnerContext, error)
// Watch watches for deployment cancellation events.
Watch(ctx context.Context, deploymentID int64) (bool, error)
// Update updates the deployment with new information.
Update(ctx context.Context, deployment *types.Deployment) (*types.Deployment, error)
// stream streams real time logs to backend
Stream(ctx context.Context, deploymentID int64, logs []*types.LogLine) error
// Upload uploads the full logs to server
Upload(ctx context.Context, deploymentID int64, r io.Reader) error
//Metrics
// UploadMetrics uploads the full metrics to server
UploadMetrics(ctx context.Context, metrics []*types.AppMetrics) error
}
func New ¶
func New(scheduler scheduler.Scheduler, serverStore store.ServerStore, applicationStore store.ApplicationStore, deploymentStore store.DeploymentStore, volumeStore store.VolumeStore, logStore store.LogStore, metrcisStore store.MetricsStore, varCtrl *variable.Controller, configSvc *config.Service, ghAppSvc *githubapp.Service, sseStreamer sse.Streamer, logStream logstream.LogStream, ) RunnerManager
func ProvideRunnerManager ¶
func ProvideRunnerManager( scheduler scheduler.Scheduler, serverStore store.ServerStore, appStore store.ApplicationStore, deploymentStore store.DeploymentStore, volumeStore store.VolumeStore, logStore store.LogStore, metricsStore store.MetricsStore, varCtrl *variable.Controller, configSvc *config.Service, ghAppSvc *githubapp.Service, sseStreamer sse.Streamer, logStream logstream.LogStream, ) RunnerManager
Click to show internal directories.
Click to hide internal directories.