static

package
v0.0.0-...-452f874 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureApp

func ConfigureApp(config *pkgmirror.Config, l *goapp.Lifecycle)

func ConfigureHttp

func ConfigureHttp(name string, conf *pkgmirror.StaticConfig, app *goapp.App)

Types

type StaticConfig

type StaticConfig struct {
	SourceServer string
	Path         string
	Code         []byte
}

type StaticFile

type StaticFile struct {
	Header     http.Header
	Url        string
	DownloadAt time.Time
	Size       int64
}

type StaticService

type StaticService struct {
	DB            *bolt.DB
	Config        *StaticConfig
	Logger        *log.Entry
	Vault         *vault.Vault
	StateChan     chan pkgmirror.State
	BoltCompacter *pkgmirror.BoltCompacter
	// contains filtered or unexported fields
}

func NewStaticService

func NewStaticService() *StaticService

func (*StaticService) Init

func (gs *StaticService) Init(app *goapp.App) (err error)

func (*StaticService) Serve

func (gs *StaticService) Serve(state *goapp.GoroutineState) error

func (*StaticService) WriteArchive

func (gs *StaticService) WriteArchive(w io.Writer, path string) (*StaticFile, error)

Jump to

Keyboard shortcuts

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