logs_sender

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendLogs

func SendLogs(l LogsSender) error

Types

type LogsSender

type LogsSender interface {
	Execute(command string, args ...string) (stdout string, stderr string, exitCode int)
	ExecuteOutputToFile(outputFilePath string, command string, args ...string) (stderr string, exitCode int)
	CreateFolderIfNotExist(folder string) error
	FileUploader(filePath string, clusterID strfmt.UUID, hostID strfmt.UUID,
		inventoryUrl string, pullSecretToken string, agentVersion string) error
}

type LogsSenderExecuter

type LogsSenderExecuter struct{}

func (*LogsSenderExecuter) CreateFolderIfNotExist

func (e *LogsSenderExecuter) CreateFolderIfNotExist(folder string) error

func (*LogsSenderExecuter) Execute

func (e *LogsSenderExecuter) Execute(command string, args ...string) (stdout string, stderr string, exitCode int)

func (*LogsSenderExecuter) ExecuteOutputToFile

func (e *LogsSenderExecuter) ExecuteOutputToFile(outputFilePath string, command string, args ...string) (stderr string, exitCode int)

func (*LogsSenderExecuter) FileUploader

func (e *LogsSenderExecuter) FileUploader(filePath string, clusterID strfmt.UUID, hostID strfmt.UUID,
	inventoryUrl string, pullSecretToken string, agentVersion string) error

type MockLogsSender

type MockLogsSender struct {
	mock.Mock
}

MockLogsSender is an autogenerated mock type for the LogsSender type

func (*MockLogsSender) CreateFolderIfNotExist

func (_m *MockLogsSender) CreateFolderIfNotExist(folder string) error

CreateFolderIfNotExist provides a mock function with given fields: folder

func (*MockLogsSender) Execute

func (_m *MockLogsSender) Execute(command string, args ...string) (string, string, int)

Execute provides a mock function with given fields: command, args

func (*MockLogsSender) ExecuteOutputToFile

func (_m *MockLogsSender) ExecuteOutputToFile(outputFilePath string, command string, args ...string) (string, int)

ExecuteOutputToFile provides a mock function with given fields: outputFilePath, command, args

func (*MockLogsSender) FileUploader

func (_m *MockLogsSender) FileUploader(filePath string, clusterID strfmt.UUID, hostID strfmt.UUID, inventoryUrl string, pullSecretToken string, agentVersion string) error

FileUploader provides a mock function with given fields: filePath, clusterID, hostID, inventoryUrl, pullSecretToken, agentVersion

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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