statusservice

package
v0.0.0-...-be2ef80 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHabSvcStatus

func ParseHabSvcStatus(output string) (*[]models.ServiceDetails, error)

Parse the output of hab svc status TODO: We need to update the below function/regex if the output of hab svc status changes

Types

type IStatusService

type IStatusService interface {
	GetServices() (*[]models.ServiceDetails, error)
}

type MockStatusService

type MockStatusService struct {
	GetServicesFunc func() (*[]models.ServiceDetails, error)
}

func (*MockStatusService) GetServices

func (mss *MockStatusService) GetServices() (*[]models.ServiceDetails, error)

type StatusService

type StatusService struct {
	ExecuteShellCommandFunc func(cmd string) ([]byte, error)
	Log                     logger.Logger
}

func NewStatusService

func NewStatusService(executeShellCommand func(cmd string) ([]byte, error), log logger.Logger) *StatusService

func (*StatusService) CheckIfBENode

func (ss *StatusService) CheckIfBENode(output string) bool

Check if it's a backend node

func (*StatusService) GetServices

func (ss *StatusService) GetServices() (*[]models.ServiceDetails, error)

func (*StatusService) GetServicesFromAutomateStatus

func (ss *StatusService) GetServicesFromAutomateStatus() (*map[string]models.ServiceDetails, error)

Get the services from chef-automate status

func (*StatusService) GetServicesFromHabSvcStatus

func (ss *StatusService) GetServicesFromHabSvcStatus() (*[]models.ServiceDetails, error)

Get the services from

func (*StatusService) ParseChefAutomateStatus

func (ss *StatusService) ParseChefAutomateStatus(output string) (*map[string]models.ServiceDetails, error)

Parse the output of chef-automate status TODO: We need to update the below function/regex if the output of chef-automate status changes

Jump to

Keyboard shortcuts

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