trigger

package
v0.0.0-...-d1e9850 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructEmptyResp

func ConstructEmptyResp(config *models.Config, checktype, msg string) []models.CheckTriggerResponse

func ConstructNilResp

func ConstructNilResp(config *models.Config, checktype, message string) []models.CheckTriggerResponse

func ErrTriggerCheckResp

func ErrTriggerCheckResp(ip, checkType, nodeType, msg string) models.CheckTriggerResponse

func HardwareNil

func HardwareNil(checkType, message string, includeOPENSEARCH bool, includePOSTGRESQL bool, includeBASTION bool) []models.CheckTriggerResponse

func RunCheck

func RunCheck(config *models.Config, log logger.Logger, port string, path string, depState string) []models.CheckTriggerResponse

func SkippedTriggerCheckResp

func SkippedTriggerCheckResp(ip, checktype, nodeType, message string) models.CheckTriggerResponse

func TriggerCheckAPI

func TriggerCheckAPI(endPoint, host, nodeType, method string, output chan<- models.CheckTriggerResponse, reqBody interface{})

TriggerCheckAPI triggers the API with provided enpoint,host,nodetype,method and reqbody. EndPoint should be string The method can be GET,POST,PUT Return an channel for output In case of error, error is stored in output channel itself

Types

type CheckTrigger

type CheckTrigger struct {
	HardwareResourceCountCheck    ICheck
	SshUserAccessCheck            ICheck
	CertificateCheck              ICheck
	ExternalOpensearchCheck       ICheck
	ExternalPostgresCheck         ICheck
	FirewallCheck                 ICheck
	FqdnCheck                     ICheck
	NfsBackupConfigCheck          ICheck
	OpensearchS3BucketAccessCheck ICheck
	S3BackupConfigCheck           ICheck
	SoftwareVersionCheck          ICheck
	SystemResourceCheck           ICheck
	SystemUserCheck               ICheck
	GCPBackupConfigCheck          ICheck
}

func NewCheckTrigger

func NewCheckTrigger(hrc, sshC, cert, eop, epc, fc, fqdn, nfs, os3, s3b, svc, src, suc, gcpb ICheck) CheckTrigger

type ErrorResponse

type ErrorResponse struct {
	Status  string          `json:"string"`
	Results []models.Checks `json:"checks"`
	Error   fiber.Error     `json:"error"`
}

type ICheck

type ICheck interface {
	Run(config *models.Config) []models.CheckTriggerResponse
	GetPortsForMockServer() map[string]map[string][]int
}

Jump to

Keyboard shortcuts

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