Documentation ¶
Index ¶
- Variables
- 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 DataLifecycleManageableServer
- 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 JobScheduler
- func (jobScheduler *JobScheduler) AddUpdateJob(jobName, threshold, every string, active bool, cmd func())
- func (jobScheduler *JobScheduler) Close()
- func (jobScheduler *JobScheduler) GetJobsStatus() ([]*ingest.Job, error)
- func (jobScheduler *JobScheduler) Start()
- func (jobScheduler *JobScheduler) StartJob(jobName string)
- func (jobScheduler *JobScheduler) Stop()
- func (jobScheduler *JobScheduler) StopJob(jobName string)
- 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) StartJobScheduler(ctx context.Context, empty *ingest.StartJobSchedulerRequest) (*ingest.StartJobSchedulerResponse, 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) StopJobScheduler(ctx context.Context, empty *ingest.StopJobSchedulerRequest) (*ingest.StopJobSchedulerResponse, 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 PurgePolicy
Constants ¶
This section is empty.
Variables ¶
var SERVICE_NAME = "ingest-service"
Functions ¶
This section is empty.
Types ¶
type AutomateEventHandlerServer ¶
type AutomateEventHandlerServer struct {
// contains filtered or unexported fields
}
func NewAutomateEventHandlerServer ¶
func NewAutomateEventHandlerServer(client backend.Client, chefIngestServer ChefIngestServer, authzProjectsClient iam_v2.ProjectsClient, eventServiceClient automate_event.EventServiceClient, configManager *config.Manager) *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 iam_v2.ProjectsClient, nodeMgrClient manager.NodeManagerServiceClient) *ChefIngestServer
newServer 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 DataLifecycleManageableServer ¶
type DataLifecycleManageableServer struct {
// contains filtered or unexported fields
}
func NewDataLifecycleManageableServer ¶
func NewDataLifecycleManageableServer(purgeClient es.EsSidecarClient, purgePolicies []PurgePolicy) *DataLifecycleManageableServer
func (*DataLifecycleManageableServer) Purge ¶
func (server *DataLifecycleManageableServer) Purge(ctx context.Context, request *dls.PurgeRequest) (*dls.PurgeResponse, error)
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 JobScheduler ¶
type JobScheduler struct {
// contains filtered or unexported fields
}
JobScheduler - this manages jobs that run on a periodic schedule (daily, hourly, or every minute.)
Multiple goroutines can use this object. Data updates are performed asynchronously, where updates are pushed as a function on to the updateQueue channel. This is patterned after Akka's Agents (https://doc.akka.io/docs/akka/2.5.6/java/agents.html)
func NewJobScheduler ¶
func NewJobScheduler() *JobScheduler
NewJobScheduler creates a new JobScheduler and starts it in the background
func (*JobScheduler) AddUpdateJob ¶
func (jobScheduler *JobScheduler) AddUpdateJob(jobName, threshold, every string, active bool, cmd func())
AddUpdateJob - add or update a job to the scheduler
func (*JobScheduler) Close ¶
func (jobScheduler *JobScheduler) Close()
Close - to close out the channel for this object. This should only be called when the service is being shutdown
func (*JobScheduler) GetJobsStatus ¶
func (jobScheduler *JobScheduler) GetJobsStatus() ([]*ingest.Job, error)
GetJobsStatus - collection information about each job running.
func (*JobScheduler) Start ¶
func (jobScheduler *JobScheduler) Start()
Start - starts the scheduler and all running jobs
func (*JobScheduler) StartJob ¶
func (jobScheduler *JobScheduler) StartJob(jobName string)
StartJob - start a job
func (*JobScheduler) Stop ¶
func (jobScheduler *JobScheduler) Stop()
Stop - stops the scheduler and all jobs
func (*JobScheduler) StopJob ¶
func (jobScheduler *JobScheduler) StopJob(jobName string)
StopJob - stop a job
type JobSchedulerServer ¶
type JobSchedulerServer struct {
// contains filtered or unexported fields
}
func NewJobSchedulerServer ¶
func NewJobSchedulerServer(client backend.Client, jobScheduler *JobScheduler, configManager *config.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) StartJobScheduler ¶
func (server *JobSchedulerServer) StartJobScheduler(ctx context.Context, empty *ingest.StartJobSchedulerRequest) (*ingest.StartJobSchedulerResponse, error)
StartJobScheduler - Start the Job Scheduler
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) StopJobScheduler ¶
func (server *JobSchedulerServer) StopJobScheduler(ctx context.Context, empty *ingest.StopJobSchedulerRequest) (*ingest.StopJobSchedulerResponse, error)
StopJobScheduler - Stop the Job Scheduler
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