labd

package
v0.0.0-...-300ac43 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Labd

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

func New

func New(root, addr string, logger *zerolog.Logger, opts ...LabdOption) (*Labd, error)

func (*Labd) Close

func (d *Labd) Close() error

func (*Labd) Serve

func (d *Labd) Serve(ctx context.Context) error

type LabdOption

type LabdOption func(*LabdSettings) error

func WithDownloaderSettings

func WithDownloaderSettings(settings downloaders.DownloaderSettings) LabdOption

func WithLibp2pPort

func WithLibp2pPort(port int) LabdOption

func WithProvider

func WithProvider(provider string) LabdOption

func WithProviderSettings

func WithProviderSettings(settings providers.ProviderSettings) LabdOption

func WithUploader

func WithUploader(uploader string) LabdOption

func WithUploaderSettings

func WithUploaderSettings(settings uploaders.UploaderSettings) LabdOption

type LabdSettings

type LabdSettings struct {
	Libp2pPort         int
	Provider           string
	ProviderSettings   providers.ProviderSettings
	Uploader           string
	UploaderSettings   uploaders.UploaderSettings
	DownloaderSettings downloaders.DownloaderSettings
}

Directories

Path Synopsis
routers
helpers
Package helpers contains helper functions to be reused by multiple routers
Package helpers contains helper functions to be reused by multiple routers

Jump to

Keyboard shortcuts

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