iomodule

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Package iomodule implements the output modules

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOutput

type CommandOutput struct {
	OutputString           *string
	FileName               string
	OrchestrationDirectory string
}

CommandOutput handles writing output to a string.

func (CommandOutput) Read

func (c CommandOutput) Read(context context.T, reader *io.PipeReader, exitCode int)

type File

type File struct {
	FileName               string
	OrchestrationDirectory string
	OutputS3BucketName     string
	OutputS3KeyPrefix      string
	LogGroupName           string
	LogStreamName          string
}

File handles writing to an output file and upload to s3 and cloudWatch

func (File) Read

func (file File) Read(context context.T, reader *io.PipeReader, exitCode int)

Read reads from the stream and writes to the output file, s3 and CloudWatchLogs.

type ICWServiceRetriever

type ICWServiceRetriever interface {
	NewCloudWatchLogsService(context context.T) ICloudWatchLoggingService
}

type ICloudWatchLoggingService

type ICloudWatchLoggingService interface {
	StreamData(
		logGroupName string,
		logStreamName string,
		absoluteFilePath string,
		isFileComplete bool,
		isLogStreamCreated bool,
		fileCompleteSignal chan bool,
		cleanupControlCharacters bool,
		structuredLogs bool) (success bool)
	SetIsFileComplete(val bool)
	GetIsUploadComplete() bool
}

type IOModule

type IOModule interface {
	Read(context.T, *io.PipeReader, int)
}

IOModule is an interface for output modules

type IS3LogsServiceRetriever

type IS3LogsServiceRetriever interface {
	NewAmazonS3Util(context context.T, outputS3BucketName string) (IS3Util, error)
}

type IS3Util

type IS3Util interface {
	S3Upload(logger log.T, outputS3BucketName string, s3Key string, filePath string) error
}

Directories

Path Synopsis
Package iomodulemock implements the mock iomodule
Package iomodulemock implements the mock iomodule

Jump to

Keyboard shortcuts

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