polling

package
v0.13.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const APIPathCommandPollingBootstrapLogs = "/command_polling/bootstrap_logs"
View Source
const APIPathCommandPollingCommand = "/command_polling/commands/%s"
View Source
const APIPathCommandPollingNextCommand = "/command_polling/command"
View Source
const APIPathCommandPollingPings = "/command_polling/pings"

Variables

This section is empty.

Functions

func GetNextCommandFailErrMocked

func GetNextCommandFailErrMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

GetNextCommandFailErrMocked test mocked function

func GetNextCommandFailJSONMocked

func GetNextCommandFailJSONMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

GetNextCommandFailJSONMocked test mocked function

func GetNextCommandFailStatusMocked

func GetNextCommandFailStatusMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

GetNextCommandFailStatusMocked test mocked function

func GetNextCommandMocked

func GetNextCommandMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

GetNextCommandMocked test mocked function

func PingFailErrMocked

func PingFailErrMocked(t *testing.T, pingIn *types.PollingPing) *types.PollingPing

PingFailErrMocked test mocked function

func PingFailJSONMocked

func PingFailJSONMocked(t *testing.T, pingIn *types.PollingPing) *types.PollingPing

PingFailJSONMocked test mocked function

func PingFailStatusMocked

func PingFailStatusMocked(t *testing.T, pingIn *types.PollingPing) *types.PollingPing

PingFailStatusMocked test mocked function

func PingMocked

func PingMocked(t *testing.T, pingIn *types.PollingPing) *types.PollingPing

PingMocked test mocked function

func ReportBootstrapLogFailErrMocked

func ReportBootstrapLogFailErrMocked(
	t *testing.T,
	commandIn *types.PollingContinuousReport,
) *types.PollingContinuousReport

ReportBootstrapLogFailErrMocked test mocked function

func ReportBootstrapLogFailJSONMocked

func ReportBootstrapLogFailJSONMocked(
	t *testing.T,
	commandIn *types.PollingContinuousReport,
) *types.PollingContinuousReport

ReportBootstrapLogFailJSONMocked test mocked function

func ReportBootstrapLogFailStatusMocked

func ReportBootstrapLogFailStatusMocked(
	t *testing.T,
	commandIn *types.PollingContinuousReport,
) *types.PollingContinuousReport

ReportBootstrapLogFailStatusMocked test mocked function

func ReportBootstrapLogMocked

func ReportBootstrapLogMocked(t *testing.T, commandIn *types.PollingContinuousReport) *types.PollingContinuousReport

ReportBootstrapLogMocked test mocked function

func UpdateCommandFailErrMocked

func UpdateCommandFailErrMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

UpdateCommandFailErrMocked test mocked function

func UpdateCommandFailJSONMocked

func UpdateCommandFailJSONMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

UpdateCommandFailJSONMocked test mocked function

func UpdateCommandFailStatusMocked

func UpdateCommandFailStatusMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

UpdateCommandFailStatusMocked test mocked function

func UpdateCommandMocked

func UpdateCommandMocked(t *testing.T, commandIn *types.PollingCommand) *types.PollingCommand

UpdateCommandMocked test mocked function

Types

type PollingService

type PollingService struct {
	// contains filtered or unexported fields
}

PollingService manages polling operations

func NewPollingService

func NewPollingService(concertoService utils.ConcertoService) (*PollingService, error)

NewPollingService returns a Concerto polling service

func (*PollingService) GetNextCommand

func (ps *PollingService) GetNextCommand() (command *types.PollingCommand, status int, err error)

GetNextCommand returns the command to be executed

func (*PollingService) Ping

func (ps *PollingService) Ping() (ping *types.PollingPing, status int, err error)

Ping resolves if new command is waiting for execution

func (*PollingService) ReportBootstrapLog

func (ps *PollingService) ReportBootstrapLog(
	pollingContinuousReportParams *map[string]interface{},
) (command *types.PollingContinuousReport, status int, err error)

ReportBootstrapLog reports a command result

func (*PollingService) UpdateCommand

func (ps *PollingService) UpdateCommand(
	commandID string,
	pollingCommandParams *map[string]interface{},
) (command *types.PollingCommand, status int, err error)

UpdateCommand updates a command by its ID

Jump to

Keyboard shortcuts

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