grpcserver

package
v0.0.0-...-4b711b1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DaysBetween

func DaysBetween(fromTime, toTime time.Time) int

DaysBetween get the calendar days between two timestamp

func LogQueryPartMin

func LogQueryPartMin(indices string, partToPrint interface{}, name string)

func ToTime

func ToTime(timestamp *google_protobuf1.Timestamp) (time.Time, error)

func ValidDurations

func ValidDurations(durations []string) bool

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 (*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 (*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) GetNodes

func (s *CfgMgmtServer) GetNodes(
	ctx context.Context,
	request *pRequest.Nodes) (*gp.ListValue, error)

func (*CfgMgmtServer) GetNodesCounts

func (s *CfgMgmtServer) GetNodesCounts(ctx context.Context,
	request *request.NodesCounts) (*response.NodesCounts, error)

GetNodesCounts returns the nodes counts

func (*CfgMgmtServer) GetNodesUsageCount

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 (s *CfgMgmtServer) GetRollouts(ctx context.Context, req *request.Rollouts) (*response.Rollouts, error)

func (*CfgMgmtServer) GetRuns

func (s *CfgMgmtServer) GetRuns(
	ctx context.Context,
	request *pRequest.Runs) (*gp.ListValue, error)

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) NodeExport

NodeExport streams a json or csv export

func (*CfgMgmtServer) PgConnection

func (s *CfgMgmtServer) PgConnection() *postgres.Postgres

func (*CfgMgmtServer) ReportExport

ReportExport streams a json or csv export

func (*CfgMgmtServer) UpdateTelemetryReported

UpdateTelemetryReported Update the last client run telemetry reported date in postgres

Jump to

Keyboard shortcuts

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