Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigurePurge(man *cereal.Manager, opts *serveropts.Opts) error
- func InitializeJobManager(c *cereal.Manager, client backend.Client, ...) error
- func JobSettingsToUpdateOpts(settings *ingest.JobSettings, oldSchedule *cereal.Schedule) ([]cereal.WorkflowScheduleUpdateOpt, bool, error)
- func MigrateJobsSchedule(ctx context.Context, c *cereal.Manager, oldConfigFile string, ...) error
- type AutomateEventHandlerServer
- func (s *AutomateEventHandlerServer) HandleEvent(ctx context.Context, req *automate_event.EventMsg) (*automate_event.EventResponse, error)
- func (s *AutomateEventHandlerServer) ProjectUpdateStatus(ctx context.Context, req *ingest_api.ProjectUpdateStatusReq) (*ingest_api.ProjectUpdateStatusResp, error)
- type ChefIngestServer
- func (s *ChefIngestServer) GetVersion(ctx context.Context, empty *ingest.VersionRequest) (*ingest.Version, error)
- func (s *ChefIngestServer) ProcessChefAction(ctx context.Context, action *chef.Action) (*response.ProcessChefActionResponse, error)
- func (s *ChefIngestServer) ProcessChefRun(ctx context.Context, run *chef.Run) (*response.ProcessChefRunResponse, error)
- func (s *ChefIngestServer) ProcessLivenessPing(ctx context.Context, liveness *chef.Liveness) (*response.ProcessLivenessResponse, error)
- func (s *ChefIngestServer) ProcessMultipleNodeDeletes(ctx context.Context, multipleNodeDeleteRequest *chef.MultipleNodeDeleteRequest) (*response.ProcessMultipleNodeDeleteResponse, error)
- func (s *ChefIngestServer) ProcessNodeDelete(ctx context.Context, delete *chef.Delete) (*response.ProcessNodeDeleteResponse, error)
- func (s *ChefIngestServer) TotalChefActionMessages() int64
- func (s *ChefIngestServer) TotalChefRunMessages() int64
- type DeleteExpiredMarkedNodesTask
- type IngestStatus
- func (is *IngestStatus) GetHealth(ctx context.Context, empty *ingest.HealthRequest) (*ingest.Health, error)
- func (is *IngestStatus) GetMetrics(ctx context.Context, empty *ingest.MetricsRequest) (*ingest.Metrics, error)
- func (is *IngestStatus) GetMigrationStatus(ctx context.Context, empty *ingest.MigrationStatusRequest) (*ingest.MigrationStatus, error)
- func (is *IngestStatus) SetChefIngestServer(s *ChefIngestServer)
- type JobSchedulerServer
- func (server *JobSchedulerServer) ConfigureDeleteNodesScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureDeleteNodesSchedulerResponse, error)
- func (server *JobSchedulerServer) ConfigureMissingNodesForDeletionScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureMissingNodesForDeletionSchedulerResponse, error)
- func (server *JobSchedulerServer) ConfigureNodesMissingScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureNodesMissingSchedulerResponse, error)
- func (server *JobSchedulerServer) DeleteMarkedNodes(ctx context.Context, empty *ingest.DeleteMarkedNodesRequest) (*ingest.DeleteMarkedNodesResponse, error)
- func (server *JobSchedulerServer) GetStatusJobScheduler(ctx context.Context, empty *ingest.JobSchedulerStatusRequest) (*ingest.JobSchedulerStatus, error)
- func (server *JobSchedulerServer) MarkMissingNodesForDeletion(ctx context.Context, empty *ingest.MarkMissingNodesForDeletionRequest) (*ingest.MarkMissingNodesForDeletionResponse, error)
- func (server *JobSchedulerServer) MarkNodesMissing(ctx context.Context, empty *ingest.MarkNodesMissingRequest) (*ingest.MarkNodesMissingResponse, error)
- func (server *JobSchedulerServer) StartDeleteNodesScheduler(ctx context.Context, empty *ingest.StartDeleteNodesSchedulerRequest) (*ingest.StartDeleteNodesSchedulerResponse, error)
- func (server *JobSchedulerServer) StartMissingNodesForDeletionScheduler(ctx context.Context, ...) (*ingest.StartMissingNodesForDeletionSchedulerResponse, error)
- func (server *JobSchedulerServer) StartNodesMissingScheduler(ctx context.Context, empty *ingest.StartNodesMissingSchedulerRequest) (*ingest.StartNodesMissingSchedulerResponse, error)
- func (server *JobSchedulerServer) StopDeleteNodesScheduler(ctx context.Context, empty *ingest.StopDeleteNodesSchedulerRequest) (*ingest.StopDeleteNodesSchedulerResponse, error)
- func (server *JobSchedulerServer) StopMissingNodesForDeletionScheduler(ctx context.Context, empty *ingest.StopMissingNodesForDeletionSchedulerRequest) (*ingest.StopMissingNodesForDeletionSchedulerResponse, error)
- func (server *JobSchedulerServer) StopNodesMissingScheduler(ctx context.Context, empty *ingest.StopNodesMissingSchedulerRequest) (*ingest.StopNodesMissingSchedulerResponse, error)
- type MarkMissingNodesForDeletionTask
- type MarkNodesMissingTask
Constants ¶
const ( PurgeScheduleName = "periodic_purge_timeseries" PurgeConvergeHistoryName = "converge-history" PurgeConvergeHistoryIndex = "converge-history" PurgeActionsName = "actions" PurgeActionsIndex = "actions" )
Variables ¶
var ( MissingNodesWorkflowName = cereal.NewWorkflowName("missing_nodes") MissingNodesScheduleName = "periodic_missing_nodes" DeleteNodesWorkflowName = cereal.NewWorkflowName("delete_nodes") DeleteNodesScheduleName = "periodic_delete_nodes" MissingNodesForDeletionWorkflowName = cereal.NewWorkflowName("missing_nodes_for_deletion") MissingNodesForDeletionScheduleName = "periodic_missing_nodes_for_deletion" )
var DefaultPurgePolicies = &purge.Policies{ Es: map[string]purge.EsPolicy{ PurgeConvergeHistoryName: { Name: PurgeConvergeHistoryName, IndexName: PurgeConvergeHistoryIndex, OlderThanDays: 30, }, PurgeActionsName: { Name: PurgeActionsName, IndexName: PurgeActionsIndex, OlderThanDays: 30, }, }, }
var (
PurgeWorkflowName = cereal.NewWorkflowName("purge_timeseries")
)
var SERVICE_NAME = "ingest-service"
Functions ¶
func ConfigurePurge ¶
func ConfigurePurge(man *cereal.Manager, opts *serveropts.Opts) error
ConfigurePurge migrates purge policies from the server options that are passed at startup and creates a scheduled workflow if it doesn't exist.
func InitializeJobManager ¶
func InitializeJobManager(c *cereal.Manager, client backend.Client, esSidecarClient es.EsSidecarServiceClient, nodeMgrClient manager.NodeManagerServiceClient, nodesClient nodes.NodesServiceClient) error
func JobSettingsToUpdateOpts ¶
func JobSettingsToUpdateOpts(settings *ingest.JobSettings, oldSchedule *cereal.Schedule) ([]cereal.WorkflowScheduleUpdateOpt, bool, error)
func MigrateJobsSchedule ¶
func MigrateJobsSchedule(ctx context.Context, c *cereal.Manager, oldConfigFile string, opts serveropts.JobsConfig) error
Types ¶
type AutomateEventHandlerServer ¶
type AutomateEventHandlerServer struct {
// contains filtered or unexported fields
}
func NewAutomateEventHandlerServer ¶
func NewAutomateEventHandlerServer(client backend.Client, chefIngestServer ChefIngestServer, authzProjectsClient authz.ProjectsServiceClient) *AutomateEventHandlerServer
func (*AutomateEventHandlerServer) HandleEvent ¶
func (s *AutomateEventHandlerServer) HandleEvent(ctx context.Context, req *automate_event.EventMsg) (*automate_event.EventResponse, error)
func (*AutomateEventHandlerServer) ProjectUpdateStatus ¶
func (s *AutomateEventHandlerServer) ProjectUpdateStatus(ctx context.Context, req *ingest_api.ProjectUpdateStatusReq) (*ingest_api.ProjectUpdateStatusResp, error)
type ChefIngestServer ¶
type ChefIngestServer struct {
// contains filtered or unexported fields
}
func NewChefIngestServer ¶
func NewChefIngestServer(client backend.Client, authzClient authz.ProjectsServiceClient, nodeMgrClient manager.NodeManagerServiceClient, nodesClient nodes.NodesServiceClient, actionPipeline pipeline.ChefActionPipeline, chefRunPipeline pipeline.ChefRunPipeline) *ChefIngestServer
NewChefIngestServer creates a new server instance and it automatically initializes the ChefRun Pipeline by consuming the provided backend client
func (*ChefIngestServer) GetVersion ¶
func (s *ChefIngestServer) GetVersion(ctx context.Context, empty *ingest.VersionRequest) (*ingest.Version, error)
GetVersion returns the service version
func (*ChefIngestServer) ProcessChefAction ¶
func (s *ChefIngestServer) ProcessChefAction(ctx context.Context, action *chef.Action) (*response.ProcessChefActionResponse, error)
ProcessChefAction
func (*ChefIngestServer) ProcessChefRun ¶
func (s *ChefIngestServer) ProcessChefRun(ctx context.Context, run *chef.Run) (*response.ProcessChefRunResponse, error)
ProcessChefRun
func (*ChefIngestServer) ProcessLivenessPing ¶
func (s *ChefIngestServer) ProcessLivenessPing(ctx context.Context, liveness *chef.Liveness) (*response.ProcessLivenessResponse, error)
func (*ChefIngestServer) ProcessMultipleNodeDeletes ¶
func (s *ChefIngestServer) ProcessMultipleNodeDeletes(ctx context.Context, multipleNodeDeleteRequest *chef.MultipleNodeDeleteRequest) (*response.ProcessMultipleNodeDeleteResponse, error)
ProcessMultipleNodeDeletes send multiple deletes actions
func (*ChefIngestServer) ProcessNodeDelete ¶
func (s *ChefIngestServer) ProcessNodeDelete(ctx context.Context, delete *chef.Delete) (*response.ProcessNodeDeleteResponse, error)
ProcessNodeDelete send a delete action threw the action pipeline
func (*ChefIngestServer) TotalChefActionMessages ¶
func (s *ChefIngestServer) TotalChefActionMessages() int64
func (*ChefIngestServer) TotalChefRunMessages ¶
func (s *ChefIngestServer) TotalChefRunMessages() int64
type IngestStatus ¶
type IngestStatus struct {
// contains filtered or unexported fields
}
func NewIngestStatus ¶
func NewIngestStatus(client backend.Client, A1migration *migration.Status) *IngestStatus
NewIngestStatus creates a new status server instance
func (*IngestStatus) GetHealth ¶
func (is *IngestStatus) GetHealth(ctx context.Context, empty *ingest.HealthRequest) (*ingest.Health, error)
GetHealth returns the health of the ingest service
func (*IngestStatus) GetMetrics ¶
func (is *IngestStatus) GetMetrics(ctx context.Context, empty *ingest.MetricsRequest) (*ingest.Metrics, error)
GetMetrics returns the metrics of the ingest service
func (*IngestStatus) GetMigrationStatus ¶
func (is *IngestStatus) GetMigrationStatus(ctx context.Context, empty *ingest.MigrationStatusRequest) (*ingest.MigrationStatus, error)
GetMigrationStatus returns the migration status if there is any migration from A1 to A2
func (*IngestStatus) SetChefIngestServer ¶
func (is *IngestStatus) SetChefIngestServer(s *ChefIngestServer)
type JobSchedulerServer ¶
type JobSchedulerServer struct {
// contains filtered or unexported fields
}
func NewJobSchedulerServer ¶
func NewJobSchedulerServer(client backend.Client, manager *cereal.Manager) *JobSchedulerServer
NewJobSchedulerServer - create a new JobSchedulerServer
func (*JobSchedulerServer) ConfigureDeleteNodesScheduler ¶
func (server *JobSchedulerServer) ConfigureDeleteNodesScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureDeleteNodesSchedulerResponse, error)
ConfigureDeleteNodesScheduler changed the configurations for the delete node scheduler
func (*JobSchedulerServer) ConfigureMissingNodesForDeletionScheduler ¶
func (server *JobSchedulerServer) ConfigureMissingNodesForDeletionScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureMissingNodesForDeletionSchedulerResponse, error)
ConfigureMissingNodesForDeletionScheduler rpc call to configure the MissingNodesForDeletion Job
func (*JobSchedulerServer) ConfigureNodesMissingScheduler ¶
func (server *JobSchedulerServer) ConfigureNodesMissingScheduler(ctx context.Context, settings *ingest.JobSettings) (*ingest.ConfigureNodesMissingSchedulerResponse, error)
ConfigureNodesMissingScheduler rpc call to configure the NodesMissing Job
func (*JobSchedulerServer) DeleteMarkedNodes ¶
func (server *JobSchedulerServer) DeleteMarkedNodes(ctx context.Context, empty *ingest.DeleteMarkedNodesRequest) (*ingest.DeleteMarkedNodesResponse, error)
DeleteMarkedNodes - run the delete node task now
func (*JobSchedulerServer) GetStatusJobScheduler ¶
func (server *JobSchedulerServer) GetStatusJobScheduler(ctx context.Context, empty *ingest.JobSchedulerStatusRequest) (*ingest.JobSchedulerStatus, error)
GetStatusJobScheduler - collect and return the status of all the jobs in the Job Scheduler
func (*JobSchedulerServer) MarkMissingNodesForDeletion ¶
func (server *JobSchedulerServer) MarkMissingNodesForDeletion(ctx context.Context, empty *ingest.MarkMissingNodesForDeletionRequest) (*ingest.MarkMissingNodesForDeletionResponse, error)
MarkMissingNodesForDeletion - run the mark missing nodes for deletion task now
func (*JobSchedulerServer) MarkNodesMissing ¶
func (server *JobSchedulerServer) MarkNodesMissing(ctx context.Context, empty *ingest.MarkNodesMissingRequest) (*ingest.MarkNodesMissingResponse, error)
MarkNodesMissing - run the mark nodes missing task now
func (*JobSchedulerServer) StartDeleteNodesScheduler ¶
func (server *JobSchedulerServer) StartDeleteNodesScheduler(ctx context.Context, empty *ingest.StartDeleteNodesSchedulerRequest) (*ingest.StartDeleteNodesSchedulerResponse, error)
StartDeleteNodesScheduler - start the scheduled task of deleting nodes
func (*JobSchedulerServer) StartMissingNodesForDeletionScheduler ¶
func (server *JobSchedulerServer) StartMissingNodesForDeletionScheduler(ctx context.Context, empty *ingest.StartMissingNodesForDeletionSchedulerRequest) (*ingest.StartMissingNodesForDeletionSchedulerResponse, error)
StartMissingNodesForDeletionScheduler - start the scheduled task of marking nodes for deletion
func (*JobSchedulerServer) StartNodesMissingScheduler ¶
func (server *JobSchedulerServer) StartNodesMissingScheduler(ctx context.Context, empty *ingest.StartNodesMissingSchedulerRequest) (*ingest.StartNodesMissingSchedulerResponse, error)
StartNodesMissingScheduler - start the scheduled task of deleting nodes
func (*JobSchedulerServer) StopDeleteNodesScheduler ¶
func (server *JobSchedulerServer) StopDeleteNodesScheduler(ctx context.Context, empty *ingest.StopDeleteNodesSchedulerRequest) (*ingest.StopDeleteNodesSchedulerResponse, error)
StopDeleteNodesScheduler - stop the scheduled delete node task from running
func (*JobSchedulerServer) StopMissingNodesForDeletionScheduler ¶
func (server *JobSchedulerServer) StopMissingNodesForDeletionScheduler(ctx context.Context, empty *ingest.StopMissingNodesForDeletionSchedulerRequest) (*ingest.StopMissingNodesForDeletionSchedulerResponse, error)
StopMissingNodesForDeletionScheduler - stop the scheduled marking nodes for deletion task from running
func (*JobSchedulerServer) StopNodesMissingScheduler ¶
func (server *JobSchedulerServer) StopNodesMissingScheduler(ctx context.Context, empty *ingest.StopNodesMissingSchedulerRequest) (*ingest.StopNodesMissingSchedulerResponse, error)
StopNodesMissingScheduler - stop the scheduled delete node task from running
type MarkMissingNodesForDeletionTask ¶
type MarkMissingNodesForDeletionTask struct { Client backend.Client NodesClient nodes.NodesServiceClient }
type MarkNodesMissingTask ¶
type MarkNodesMissingTask struct { Client backend.Client NodeMgrClient manager.NodeManagerServiceClient }