datatrade

package
v0.0.0-...-5c345c6 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 12 Imported by: 0

README

datatrade

datatrade

Usage

type Config
type Config struct {
	*provider.Config
}

Config holds all configuration for the provider.

func NewConfig
func NewConfig(flagSet *pflag.FlagSet, v *viper.Viper) *Config

NewConfig creates a new instance of Config.

func (*Config) DatasetDir
func (c *Config) DatasetDir() string

DatasetDir returns the directory in which datasets are stored on nodes.

func (*Config) LoadConfig
func (c *Config) LoadConfig() error

LoadConfig loads and validates the config data.

func (*Config) NodeCoordinatorPort
func (c *Config) NodeCoordinatorPort() uint

NodeCoordinatorPort returns the port that node coordinators are running on.

func (*Config) Validate
func (c *Config) Validate() error

Validate returns whether the config is valid, containing necessary values.

type ConfigData
type ConfigData struct {
	provider.ConfigData
	DatasetDir          string `json:"dataset_dir"`
	NodeCoordinatorPort uint   `json:"node_coordinator_port"`
}

ConfigData defines the structure of the config data (e.g. in the config file)

type DatasetImportArgs
type DatasetImportArgs struct {
	NFS        bool   `json:"nfs"`
	Quota      uint64 `json:"quota"`
	ReadOnly   bool   `json:"readOnly"`
	Redundancy uint64 `json:"redundancy"`
}

DatasetImportArgs are arguments for configuring an imported dataset.

type DatasetImportResult
type DatasetImportResult struct {
	Dataset clusterconf.Dataset `json:"dataset"`
	NodeID  string              `json:"nodeID"`
}

DatasetImportResult is the result of a dataset import.

type Provider
type Provider struct {
}

Provider is a provider of data import and export functionality.

func New
func New(config *Config, tracker *acomm.Tracker) *Provider

New creates a new instance of Provider.

func (*Provider) DatasetImport
func (p *Provider) DatasetImport(req *acomm.Request) (interface{}, *url.URL, error)

DatasetImport imports a dataset into the cluster and tracks it in the cluster configuration.

func (*Provider) RegisterTasks
func (p *Provider) RegisterTasks(server *provider.Server)

RegisterTasks registers all of the provider task handlers with the server.

-- Generated with godocdown

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*provider.Config
}

Config holds all configuration for the provider.

func NewConfig

func NewConfig(flagSet *pflag.FlagSet, v *viper.Viper) *Config

NewConfig creates a new instance of Config.

func (*Config) DatasetDir

func (c *Config) DatasetDir() string

DatasetDir returns the directory in which datasets are stored on nodes.

func (*Config) LoadConfig

func (c *Config) LoadConfig() error

LoadConfig loads and validates the config data.

func (*Config) NodeCoordinatorPort

func (c *Config) NodeCoordinatorPort() uint

NodeCoordinatorPort returns the port that node coordinators are running on.

func (*Config) Validate

func (c *Config) Validate() error

Validate returns whether the config is valid, containing necessary values.

type ConfigData

type ConfigData struct {
	provider.ConfigData
	DatasetDir          string `json:"dataset_dir"`
	NodeCoordinatorPort uint   `json:"node_coordinator_port"`
}

ConfigData defines the structure of the config data (e.g. in the config file)

type DatasetImportArgs

type DatasetImportArgs struct {
	NFS        bool   `json:"nfs"`
	Quota      uint64 `json:"quota"`
	ReadOnly   bool   `json:"readOnly"`
	Redundancy uint64 `json:"redundancy"`
}

DatasetImportArgs are arguments for configuring an imported dataset.

type DatasetImportResult

type DatasetImportResult struct {
	Dataset clusterconf.Dataset `json:"dataset"`
	NodeID  string              `json:"nodeID"`
}

DatasetImportResult is the result of a dataset import.

type Provider

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

Provider is a provider of data import and export functionality.

func New

func New(config *Config, tracker *acomm.Tracker) *Provider

New creates a new instance of Provider.

func (*Provider) DatasetImport

func (p *Provider) DatasetImport(req *acomm.Request) (interface{}, *url.URL, error)

DatasetImport imports a dataset into the cluster and tracks it in the cluster configuration.

func (*Provider) RegisterTasks

func (p *Provider) RegisterTasks(server *provider.Server)

RegisterTasks registers all of the provider task handlers with the server.

Jump to

Keyboard shortcuts

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