Documentation ¶
Index ¶
- func DaysBetween(fromTime, toTime time.Time) int
- func LogQueryPartMin(indices string, partToPrint interface{}, name string)
- func ToTime(timestamp *google_protobuf1.Timestamp) (time.Time, error)
- func ValidDurations(durations []string) bool
- type CfgMgmtServer
- func (s *CfgMgmtServer) ClearPg() error
- func (s *CfgMgmtServer) ConnectPg() error
- func (s *CfgMgmtServer) CreateRollout(ctx context.Context, req *request.CreateRollout) (*response.Rollout, error)
- func (s *CfgMgmtServer) CreateRolloutTest(ctx context.Context, req *request.CreateRolloutTest) (*response.CreateRolloutTest, error)
- func (s *CfgMgmtServer) GetAttributes(ctx context.Context, request *pRequest.Node) (*interserviceResp.NodeAttribute, error)
- func (s *CfgMgmtServer) GetCheckInCountsTimeSeries(ctx context.Context, request *request.CheckInCountsTimeSeries) (*response.CheckInCountsTimeSeries, error)
- func (s *CfgMgmtServer) GetErrors(ctx context.Context, req *extReq.Errors) (*externalResp.Errors, error)
- func (s *CfgMgmtServer) GetHealth(ctx context.Context, empty *request.Health) (*response.Health, error)
- func (s *CfgMgmtServer) GetInventoryNodes(ctx context.Context, request *pRequest.InventoryNodes) (*interserviceResp.InventoryNodes, error)
- func (s *CfgMgmtServer) GetMissingNodeDurationCounts(ctx context.Context, request *pRequest.MissingNodeDurationCounts) (*interserviceResp.MissingNodeDurationCounts, error)
- func (s *CfgMgmtServer) GetNodeMetadataCounts(ctx context.Context, req *request.NodeMetadataCounts) (*response.NodeMetadataCounts, error)
- func (s *CfgMgmtServer) GetNodeRun(ctx context.Context, request *request.NodeRun) (*response.Run, error)
- func (s *CfgMgmtServer) GetNodeRunsDailyStatusTimeSeries(ctx context.Context, request *request.NodeRunsDailyStatusTimeSeries) (*response.NodeRunsDailyStatusTimeSeries, error)
- func (s *CfgMgmtServer) GetNodes(ctx context.Context, request *pRequest.Nodes) (*gp.ListValue, error)
- func (s *CfgMgmtServer) GetNodesCounts(ctx context.Context, request *request.NodesCounts) (*response.NodesCounts, error)
- func (s *CfgMgmtServer) GetNodesUsageCount(ctx context.Context, req *request.GetNodesUsageCountRequest) (*response.GetNodesUsageCountResponse, error)
- func (s *CfgMgmtServer) GetOrganizations(ctx context.Context, empty *request.Organizations) (*gpStruct.ListValue, error)
- func (s *CfgMgmtServer) GetPolicyCookbooks(ctx context.Context, request *request.PolicyRevision) (*response.PolicyCookbooks, error)
- func (s *CfgMgmtServer) GetRolloutById(ctx context.Context, req *request.RolloutById) (*response.Rollout, error)
- func (s *CfgMgmtServer) GetRollouts(ctx context.Context, req *request.Rollouts) (*response.Rollouts, error)
- func (s *CfgMgmtServer) GetRuns(ctx context.Context, request *pRequest.Runs) (*gp.ListValue, error)
- func (s *CfgMgmtServer) GetRunsCounts(ctx context.Context, request *request.RunsCounts) (*response.RunsCounts, error)
- func (s *CfgMgmtServer) GetSourceFqdns(ctx context.Context, empty *request.SourceFQDNS) (*gpStruct.ListValue, error)
- func (s *CfgMgmtServer) GetSuggestions(ctx context.Context, request *request.Suggestion) (*gpStruct.ListValue, error)
- func (s *CfgMgmtServer) GetVersion(ctx context.Context, empty *request.VersionInfo) (*response.VersionInfo, error)
- func (s *CfgMgmtServer) HandlePolicyUpdateAction(ctx context.Context, req *request.PolicyUpdateAction) (*response.PolicyUpdateAction, error)
- func (s *CfgMgmtServer) ListNodeSegmentsWithRolloutProgress(ctx context.Context, req *request.ListNodeSegmentsWithRolloutProgress) (*response.NodeSegmentsWithRolloutProgress, error)
- func (s *CfgMgmtServer) NodeExport(request *pRequest.NodeExport, stream service.CfgMgmtService_NodeExportServer) error
- func (s *CfgMgmtServer) PgConnection() *postgres.Postgres
- func (s *CfgMgmtServer) ReportExport(request *pRequest.ReportExport, ...) error
- func (s *CfgMgmtServer) UpdateTelemetryReported(ctx context.Context, req *request.UpdateTelemetryReportedRequest) (*response.UpdateTelemetryReportedResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaysBetween ¶
DaysBetween get the calendar days between two timestamp
func LogQueryPartMin ¶
func ValidDurations ¶
Types ¶
type CfgMgmtServer ¶
type CfgMgmtServer struct {
// contains filtered or unexported fields
}
CfgMgmtServer stores client
func NewCfgMgmtServer ¶
func NewCfgMgmtServer(cs *config.Service) *CfgMgmtServer
NewCfgMgmtServer creates a new server instance and it automatically initializes the ChefRun Pipeline by consuming the provided backend client
func (*CfgMgmtServer) ClearPg ¶
func (s *CfgMgmtServer) ClearPg() error
func (*CfgMgmtServer) ConnectPg ¶
func (s *CfgMgmtServer) ConnectPg() error
func (*CfgMgmtServer) CreateRollout ¶
func (s *CfgMgmtServer) CreateRollout(ctx context.Context, req *request.CreateRollout) (*response.Rollout, error)
func (*CfgMgmtServer) CreateRolloutTest ¶
func (s *CfgMgmtServer) CreateRolloutTest(ctx context.Context, req *request.CreateRolloutTest) (*response.CreateRolloutTest, error)
func (*CfgMgmtServer) GetAttributes ¶
func (s *CfgMgmtServer) GetAttributes( ctx context.Context, request *pRequest.Node) (*interserviceResp.NodeAttribute, error)
GetAttributes get node attributes
func (*CfgMgmtServer) GetCheckInCountsTimeSeries ¶
func (s *CfgMgmtServer) GetCheckInCountsTimeSeries(ctx context.Context, request *request.CheckInCountsTimeSeries) (*response.CheckInCountsTimeSeries, error)
GetCheckInCountsTimeSeries - Returns a daily time series of unique node check-ins for the number of day requested
func (*CfgMgmtServer) GetErrors ¶
func (s *CfgMgmtServer) GetErrors(ctx context.Context, req *extReq.Errors) (*externalResp.Errors, error)
func (*CfgMgmtServer) GetHealth ¶
func (s *CfgMgmtServer) GetHealth(ctx context.Context, empty *request.Health) (*response.Health, error)
GetHealth returns the service Health
func (*CfgMgmtServer) GetInventoryNodes ¶
func (s *CfgMgmtServer) GetInventoryNodes(ctx context.Context, request *pRequest.InventoryNodes) (*interserviceResp.InventoryNodes, error)
GetInventoryNodes - get all the inventory nodes
func (*CfgMgmtServer) GetMissingNodeDurationCounts ¶
func (s *CfgMgmtServer) GetMissingNodeDurationCounts( ctx context.Context, request *pRequest.MissingNodeDurationCounts) (*interserviceResp.MissingNodeDurationCounts, error)
func (*CfgMgmtServer) GetNodeMetadataCounts ¶
func (s *CfgMgmtServer) GetNodeMetadataCounts(ctx context.Context, req *request.NodeMetadataCounts) (*response.NodeMetadataCounts, error)
GetNodeMetadataCounts - For each type of field provided return distinct values the amount for each. For example, if the 'platform' field is requested 'windows' 10, 'redhat' 5, and 'ubuntu' 8 could be returned. The number next to each represents the number of nodes with that type of platform.
func (*CfgMgmtServer) GetNodeRun ¶
func (s *CfgMgmtServer) GetNodeRun(ctx context.Context, request *request.NodeRun) (*response.Run, error)
GetNodeRun returns the requested run
func (*CfgMgmtServer) GetNodeRunsDailyStatusTimeSeries ¶
func (s *CfgMgmtServer) GetNodeRunsDailyStatusTimeSeries(ctx context.Context, request *request.NodeRunsDailyStatusTimeSeries) (*response.NodeRunsDailyStatusTimeSeries, error)
This function provides the status of runs for each 24-hour duration. For multiple runs in one 24-hour duration, the most recent failed run will be returned. If there are no failed runs the most recent successful run will be returned. If no runs are found in the 24-hour duration, the status will be "missing" and no run will be returned.
func (*CfgMgmtServer) GetNodesCounts ¶
func (s *CfgMgmtServer) GetNodesCounts(ctx context.Context, request *request.NodesCounts) (*response.NodesCounts, error)
GetNodesCounts returns the nodes counts
func (*CfgMgmtServer) GetNodesUsageCount ¶
func (s *CfgMgmtServer) GetNodesUsageCount(ctx context.Context, req *request.GetNodesUsageCountRequest) (*response.GetNodesUsageCountResponse, error)
GetNodesUsageCount returns the count of unique nodes with lastRun in a given time.
func (*CfgMgmtServer) GetOrganizations ¶
func (s *CfgMgmtServer) GetOrganizations(ctx context.Context, empty *request.Organizations) (*gpStruct.ListValue, error)
GetOrganizations returns the a list of all organizations
func (*CfgMgmtServer) GetPolicyCookbooks ¶
func (s *CfgMgmtServer) GetPolicyCookbooks(ctx context.Context, request *request.PolicyRevision) (*response.PolicyCookbooks, error)
GetPolicyCookbooks returns a list of cookbook name, policy identifier and name of policy based on revision id
func (*CfgMgmtServer) GetRolloutById ¶
func (s *CfgMgmtServer) GetRolloutById(ctx context.Context, req *request.RolloutById) (*response.Rollout, error)
func (*CfgMgmtServer) GetRollouts ¶
func (*CfgMgmtServer) GetRunsCounts ¶
func (s *CfgMgmtServer) GetRunsCounts(ctx context.Context, request *request.RunsCounts) (*response.RunsCounts, error)
GetRunsCounts returns the runs counts for a node
func (*CfgMgmtServer) GetSourceFqdns ¶
func (s *CfgMgmtServer) GetSourceFqdns(ctx context.Context, empty *request.SourceFQDNS) (*gpStruct.ListValue, error)
GetSourceFqdns returns a list of all source_fqdns
func (*CfgMgmtServer) GetSuggestions ¶
func (s *CfgMgmtServer) GetSuggestions(ctx context.Context, request *request.Suggestion) (*gpStruct.ListValue, error)
func (*CfgMgmtServer) GetVersion ¶
func (s *CfgMgmtServer) GetVersion(ctx context.Context, empty *request.VersionInfo) (*response.VersionInfo, error)
GetVersion returns the service version
func (*CfgMgmtServer) HandlePolicyUpdateAction ¶
func (s *CfgMgmtServer) HandlePolicyUpdateAction(ctx context.Context, req *request.PolicyUpdateAction) (*response.PolicyUpdateAction, error)
func (*CfgMgmtServer) ListNodeSegmentsWithRolloutProgress ¶
func (s *CfgMgmtServer) ListNodeSegmentsWithRolloutProgress(ctx context.Context, req *request.ListNodeSegmentsWithRolloutProgress) (*response.NodeSegmentsWithRolloutProgress, error)
func (*CfgMgmtServer) NodeExport ¶
func (s *CfgMgmtServer) NodeExport(request *pRequest.NodeExport, stream service.CfgMgmtService_NodeExportServer) error
NodeExport streams a json or csv export
func (*CfgMgmtServer) PgConnection ¶
func (s *CfgMgmtServer) PgConnection() *postgres.Postgres
func (*CfgMgmtServer) ReportExport ¶
func (s *CfgMgmtServer) ReportExport(request *pRequest.ReportExport, stream service.CfgMgmtService_ReportExportServer) error
ReportExport streams a json or csv export
func (*CfgMgmtServer) UpdateTelemetryReported ¶
func (s *CfgMgmtServer) UpdateTelemetryReported(ctx context.Context, req *request.UpdateTelemetryReportedRequest) (*response.UpdateTelemetryReportedResponse, error)
UpdateTelemetryReported Update the last client run telemetry reported date in postgres