source

package
v0.0.0-...-4d179a5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemeHTTP  = "http"
	SchemeHTTPS = "https"
	SchemeFTP   = "ftp"
)

Variables

This section is empty.

Functions

func Register

func Register(c Creator)

Types

type Creator

type Creator interface {
	Create() (StreamReader, error)
	Scheme() string
}

type StreamReader

type StreamReader interface {
	Open(url string) error

	Size(ctx context.Context) (int64, error)

	SetConfig(key string, value string)

	Get(ctx context.Context, offset int64, size int64) (io.ReadCloser, error)

	Close()
}

func GetStreamReader

func GetStreamReader(scheme string) (StreamReader, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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