server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 18 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RootHandler

func RootHandler(ac auth.AccessController, ctx context.Context, trust signed.CryptoService,
	consistent, current utils.CacheControlConfig, repoPrefixes []string) http.Handler

RootHandler returns the handler that routes all the paths from / for the server.

func Run

func Run(ctx context.Context, conf Config) error

Run sets up and starts a TLS server that can be cancelled using the given configuration. The context it is passed is the context it should use directly for the TLS server, and generate children off for requests

Types

type Config added in v0.3.0

type Config struct {
	Addr                         string
	TLSConfig                    *tls.Config
	Trust                        signed.CryptoService
	AuthMethod                   string
	AuthOpts                     interface{}
	RepoPrefixes                 []string
	ConsistentCacheControlConfig utils.CacheControlConfig
	CurrentCacheControlConfig    utils.CacheControlConfig
}

Config tells Run how to configure a server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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