jobfile

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 12 Imported by: 0

Documentation

Overview

Package jobfile provides for basic operations for manipulating files associated with a job

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

A Client manages a connection with the job file service

func DefaultClient

func DefaultClient() (*Client, error)

DefaultClient creates a Client based on parameters available in the environment

func (*Client) ListFiles

func (c *Client) ListFiles(ctx context.Context, jobID JobID) ([]*File, error)

ListFiles returns files for a job. If jobID is empty, list files for the current job.

func (*Client) NewReader

func (c *Client) NewReader(ctx context.Context, jobID JobID, name string) io.ReadCloser

NewReader returns a reader of a filename in the given job. If the job id is missing, read a file in the current job.

func (*Client) NewWriter

func (c *Client) NewWriter(ctx context.Context, name string) io.WriteCloser

NewWriter returns a writer to the filename in the current job

type File

type File struct {
	Name  string
	Dir   string
	Size  int64
	IsDir bool
}

A File is data about a file

type JobID

type JobID string

JobID is the ID of a job run through Antha. This can be used to obtain the outputs of that Job.

Jump to

Keyboard shortcuts

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