server

package
v0.0.0-...-0490640 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 (*AutomateEventHandlerServer) ProjectUpdateStatus

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

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

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

MarkMissingNodesForDeletion - run the mark missing nodes for deletion task now

func (*JobSchedulerServer) MarkNodesMissing

MarkNodesMissing - run the mark nodes missing task now

func (*JobSchedulerServer) StartDeleteNodesScheduler

StartDeleteNodesScheduler - start the scheduled task of deleting nodes

func (*JobSchedulerServer) StartJobScheduler

StartJobScheduler - Start the Job Scheduler

func (*JobSchedulerServer) StartMissingNodesForDeletionScheduler

StartMissingNodesForDeletionScheduler - start the scheduled task of marking nodes for deletion

func (*JobSchedulerServer) StartNodesMissingScheduler

StartNodesMissingScheduler - start the scheduled task of deleting nodes

func (*JobSchedulerServer) StopDeleteNodesScheduler

StopDeleteNodesScheduler - stop the scheduled delete node task from running

func (*JobSchedulerServer) StopJobScheduler

StopJobScheduler - Stop the Job Scheduler

func (*JobSchedulerServer) StopMissingNodesForDeletionScheduler

StopMissingNodesForDeletionScheduler - stop the scheduled marking nodes for deletion task from running

func (*JobSchedulerServer) StopNodesMissingScheduler

StopNodesMissingScheduler - stop the scheduled delete node task from running

type PurgePolicy

type PurgePolicy struct {
	// PurgeOlderThanDays describes how long we keep time series data. Anything
	// older than this is allowed to be regularly removed.
	PurgeOlderThanDays int32
	// IndexName is the base name of the time series index that should be purged
	IndexName string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL