uplink

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is the errs class of standard End User Client errors
	Error = errs.Class("Uplink configuration error")
)

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	APIKey        string      `default:"" help:"the api key to use for the satellite" noprefix:"true"`
	SatelliteAddr string      `default:"localhost:7778" devDefault:"localhost:10000" help:"the address to use for the satellite" noprefix:"true"`
	MaxInlineSize memory.Size `help:"max inline segment size in bytes" default:"4KiB"`
	SegmentSize   memory.Size `help:"the size of a segment in bytes" default:"64MiB"`
}

ClientConfig is a configuration struct for the uplink that controls how to talk to the rest of the network.

type Config

type Config struct {
	Client ClientConfig
	RS     RSConfig
	Enc    EncryptionConfig
	TLS    tlsopts.Config
}

Config uplink configuration

func (Config) GetEncryptionScheme

func (c Config) GetEncryptionScheme() storj.EncryptionScheme

GetEncryptionScheme returns the configured encryption scheme for new uploads

func (Config) GetMetainfo

func (c Config) GetMetainfo(ctx context.Context, identity *identity.FullIdentity) (db storj.Metainfo, ss streams.Store, err error)

GetMetainfo returns an implementation of storj.Metainfo

func (Config) GetRedundancyScheme

func (c Config) GetRedundancyScheme() storj.RedundancyScheme

GetRedundancyScheme returns the configured redundancy scheme for new uploads

type EncryptionConfig

type EncryptionConfig struct {
	Key       string      `help:"root key for encrypting the data"`
	BlockSize memory.Size `help:"size (in bytes) of encrypted blocks" default:"1KiB"`
	DataType  int         `help:"Type of encryption to use for content and metadata (1=AES-GCM, 2=SecretBox)" default:"1"`
	PathType  int         `help:"Type of encryption to use for paths (0=Unencrypted, 1=AES-GCM, 2=SecretBox)" default:"1"`
}

EncryptionConfig is a configuration struct that keeps details about encrypting segments

type RSConfig

type RSConfig struct {
	MaxBufferMem     memory.Size `help:"maximum buffer memory (in bytes) to be allocated for read buffers" default:"4MiB"`
	ErasureShareSize memory.Size `help:"the size of each new erasure sure in bytes" default:"1KiB"`
	MinThreshold     int         `help:"the minimum pieces required to recover a segment. k." default:"29" devDefault:"4"`
	RepairThreshold  int         `help:"the minimum safe pieces before a repair is triggered. m." default:"35" devDefault:"6"`
	SuccessThreshold int         `help:"the desired total pieces for a segment. o." default:"80" devDefault:"8"`
	MaxThreshold     int         `help:"the largest amount of pieces to encode to. n." default:"95" devDefault:"10"`
}

RSConfig is a configuration struct that keeps details about default redundancy strategy information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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