controller_client

package
v0.0.0-...-f839e32 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncomingTasksHandler

func IncomingTasksHandler(incomingQueue, outgoingQueue chan *common.Task)

IncomingTasksHandler

func SendBytes

func SendBytes(client service.DataPlaneClient, data []byte, options *DataExchangeOptions) (int64, error)

SendBytes

func SendEchoRequest

func SendEchoRequest(outgoingQueue chan *common.Task)

SendEchoRequest

func SendFile

func SendFile(client service.DataPlaneClient, filename string, options *DataExchangeOptions) (int64, error)

SendFile sends file from client to service and receives response back (if any)

func SendReader

func SendReader(client service.DataPlaneClient, r io.Reader, options *DataExchangeOptions) (int64, error)

SendReader

func SendStdin

func SendStdin(client service.DataPlaneClient, options *DataExchangeOptions) (int64, error)

SendStdin sends STDIN from client to service and receives response back (if any)

func TasksExchange

func TasksExchange(ControlPlaneClient service.ControlPlaneClient)

TasksExchange exchanges tasks

Types

type DataExchangeOptions

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

DataExchangeOptions

func NewDataExchangeOptions

func NewDataExchangeOptions() *DataExchangeOptions

NewDataExchangeOptions

func (*DataExchangeOptions) Ensure

func (opts *DataExchangeOptions) Ensure() *DataExchangeOptions

Ensure

func (*DataExchangeOptions) EnsureMetadata

func (opts *DataExchangeOptions) EnsureMetadata() *common.Metadata

EnsureMetadata

func (*DataExchangeOptions) GetCompress

func (opts *DataExchangeOptions) GetCompress() bool

GetCompress

func (*DataExchangeOptions) GetDecompress

func (opts *DataExchangeOptions) GetDecompress() bool

GetDecompress

func (*DataExchangeOptions) GetMetadata

func (opts *DataExchangeOptions) GetMetadata() *common.Metadata

GetMetadata

func (*DataExchangeOptions) GetWaitReply

func (opts *DataExchangeOptions) GetWaitReply() bool

GetWaitReply

func (*DataExchangeOptions) SetCompress

func (opts *DataExchangeOptions) SetCompress(compress bool) *DataExchangeOptions

SetCompress

func (*DataExchangeOptions) SetDecompress

func (opts *DataExchangeOptions) SetDecompress(decompress bool) *DataExchangeOptions

SetDecompress

func (*DataExchangeOptions) SetMetadata

func (opts *DataExchangeOptions) SetMetadata(meta *common.Metadata) *DataExchangeOptions

SetMetadata

func (*DataExchangeOptions) SetWaitReply

func (opts *DataExchangeOptions) SetWaitReply(waitReply bool) *DataExchangeOptions

SetWaitReply

type DataExchangeResult

type DataExchangeResult struct {
	// Err is an error
	Error  error
	Errors []error

	// Send describes outgoing result
	Send struct {
		Data struct {
			Len int64
		}
	}

	// Recv describes incoming result
	Recv struct {
		Data struct {
			Len      int64
			Data     *bytes.Buffer
			Metadata *common.Metadata
		}
		ObjectStatus *common.ObjectStatus
		ObjectsList  *common.ObjectsList
	}
}

DataExchangeResult represents result of data exchange

func DataExchange

func DataExchange(
	DataPlaneClient service.DataPlaneClient,
	src io.Reader,
	options *DataExchangeOptions,
) *DataExchangeResult

DataExchange send data to server and receives back reply (if needed)

func Download

func Download(
	DataPlaneClient service.DataPlaneClient,
	dst io.Writer,
	taskId, filename string,
	options *DataExchangeOptions,
) *DataExchangeResult

Download downloads data from server

func DownloadIntoBuffer

func DownloadIntoBuffer(client service.DataPlaneClient, taskId, filename string, options *DataExchangeOptions) *DataExchangeResult

DownloadIntoBuffer downloads into bytes.Buffer of DataExchangeResult

func DownloadIntoFile

func DownloadIntoFile(client service.DataPlaneClient, taskId, filename string, options *DataExchangeOptions) *DataExchangeResult

DownloadIntoFile sends file from client to service and receives response back (if any)

func DownloadIntoStdout

func DownloadIntoStdout(client service.DataPlaneClient, taskId, filename string, options *DataExchangeOptions) *DataExchangeResult

DownloadIntoStdout sends STDIN from client to service and receives response back (if any)

func DownloadIntoWriter

func DownloadIntoWriter(client service.DataPlaneClient, taskId, filename string, w io.Writer, options *DataExchangeOptions) *DataExchangeResult

DownloadIntoWriter downloads into io.Writer

func GetTask

func GetTask(ReportsPlaneClient service.ReportsPlaneClient, taskUUID *common.UUID) *DataExchangeResult

GetTask requests task

func GetTaskFiles

func GetTaskFiles(ReportsPlaneClient service.ReportsPlaneClient, taskUUID *common.UUID, jps []string) *DataExchangeResult

GetTaskFiles requests file(es) of the task

func GetTaskReport

func GetTaskReport(ReportsPlaneClient service.ReportsPlaneClient, taskUUID *common.UUID) *DataExchangeResult

GetTaskReport requests report(es) of the task

func GetTaskStatus

func GetTaskStatus(ReportsPlaneClient service.ReportsPlaneClient, taskUUID *common.UUID) *DataExchangeResult

GetTaskStatus requests status(es) of the task

func NewDataExchangeResult

func NewDataExchangeResult() *DataExchangeResult

NewDataExchangeResult

func NewDataExchangeResultError

func NewDataExchangeResultError(err error) *DataExchangeResult

NewDataExchangeResultError

func Upload

func Upload(
	DataPlaneClient service.DataPlaneClient,
	src io.Reader,
	options *DataExchangeOptions,
) *DataExchangeResult

Upload send data to server and receives back status(es)

func UploadBytes

func UploadBytes(client service.DataPlaneClient, data []byte, options *DataExchangeOptions) *DataExchangeResult

UploadBytes

func UploadFile

func UploadFile(client service.DataPlaneClient, filename string, options *DataExchangeOptions) *DataExchangeResult

UploadFile sends file from client to service and receives response back (if any)

func UploadReader

func UploadReader(client service.DataPlaneClient, r io.Reader, options *DataExchangeOptions) *DataExchangeResult

UploadReader

func UploadStdin

func UploadStdin(client service.DataPlaneClient, options *DataExchangeOptions) *DataExchangeResult

UploadStdin sends STDIN from client to service and receives response back (if any)

func UploadStdinLog

func UploadStdinLog(client service.DataPlaneClient, options *DataExchangeOptions) *DataExchangeResult

UploadStdinLog sends STDIN in time chunks from client to service and receives response back (if any)

Jump to

Keyboard shortcuts

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